Skip to content

Default user to "root:root" rather than "root". - #2542

Merged
samalba merged 1 commit into
dagger:mainfrom
sipsma:default-user
Jun 1, 2022
Merged

samalba merged 1 commit into
dagger:mainfrom
sipsma:default-user

Conversation

@sipsma

@sipsma sipsma commented May 31, 2022

Copy link
Copy Markdown
Contributor

Defaulting the user of an exec to "root" causes errors when using images
that don't have /etc/passwd ("distroless" and similar type images).

BuildKit's logic is bit surprising here. If we instead provide
"root:root", then it has a codepath that will automatically default to
using uid/gid 0 without needing to check /etc/passwd or /etc/group.

Signed-off-by: Erik Sipsma [email protected]

User in discord encountered this, also seems to have been reported previously, fixes #1659

Defaulting the user of an exec to "root" causes errors when using images
that don't have /etc/passwd ("distroless" and similar type images).

BuildKit's logic is bit surprising here. If we instead provide
"root:root", then it has a codepath that will automatically default to
using uid/gid 0 without needing to check /etc/passwd or /etc/group.

Signed-off-by: Erik Sipsma <[email protected]>
@sipsma
sipsma requested review from a team, helderco and shykes as code owners May 31, 2022 22:00

@TomChv TomChv left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It's a funny issue, nice catch 🚀

@samalba
samalba merged commit 9f79d63 into dagger:main Jun 1, 2022
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.

Strange buildkit error on yarn test

3 participants