镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

Fix: switch to root in the generated Dockerfile - #500

Open
rafayqayyum wants to merge 1 commit into
test-kitchen:mainfrom
rafayqayyum:fix-non-root-base-image
Open

rafayqayyum wants to merge 1 commit into
test-kitchen:mainfrom
rafayqayyum:fix-non-root-base-image

Conversation

@rafayqayyum

Copy link
Copy Markdown

Description

The generated Dockerfile inherits the base image's USER. With an image that ends in e.g. USER appuser, every setup RUN line runs unprivileged and the build fails (ln: failed to create symbolic link '/sbin/initctl': Permission denied). run_options: --user=root can't help, since it only applies to docker run.

As suggested in the issue, this emits USER root straight after FROM. A configured dockerfile: is untouched. For images that already run as root this is a no-op.

Issues Resolved

Fixes #339

Type of Change

fix: bug fix (SemVer patch). Commit: fix: switch to root in the generated Dockerfile

Check List

Copilot AI balanced review requested due to automatic review settings November 8, 2026 15:13

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@RulerOf RulerOf left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is sensible behavior for this driver's use case IMO.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

non-root docker-container failed to start .e.g Jenkins

3 participants