Skip to content

Use numeric uid:gid for the opam-repository COPY --chown#352

Open
mtelvers wants to merge 1 commit into
ocurrent:masterfrom
mtelvers:numeric-chown-opam-repository
Open

Use numeric uid:gid for the opam-repository COPY --chown#352
mtelvers wants to merge 1 commit into
ocurrent:masterfrom
mtelvers:numeric-chown-opam-repository

Conversation

@mtelvers

@mtelvers mtelvers commented Jun 6, 2026

Copy link
Copy Markdown
Member

A name-based --chown on a COPY --link (scratch base, no /etc/passwd) fails with invalid user index: -1 under BuildKit's containerd image-store worker — the default since Docker 29 / Ubuntu 26.04. The opam user is always uid 1000, so use numeric ids. builds.expected regenerated.

COPY --link copies onto an empty scratch base, so a name-based --chown
has no /etc/passwd to resolve against under BuildKit's containerd
image-store worker (the default since Docker 29 / Ubuntu 26.04) and
fails with "invalid user index: -1". The opam user is always created
with --uid 1000; numeric ids need no lookup and work on both the
graphdriver and containerd workers. builds.expected regenerated.
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.

1 participant