Skip to content

fix: use numeric UID/GID 8888 for curl_user and curl_group#117

Open
codersofthedark wants to merge 1 commit intocurl:mainfrom
codersofthedark:fix/numeric-user-id
Open

fix: use numeric UID/GID 8888 for curl_user and curl_group#117
codersofthedark wants to merge 1 commit intocurl:mainfrom
codersofthedark:fix/numeric-user-id

Conversation

@codersofthedark
Copy link
Copy Markdown

Fixes #25

What

Pin curl_group GID and curl_user UID to 8888 in create_base_image.sh, and switch create_appliance_image.sh from --user curl_user to --user 8888.

Why

Using a symbolic username in the USER directive can fail in minimal or distroless environments where /etc/passwd is not present — the runtime cannot resolve the name to a UID and the container may fail to start.

Pinning to a fixed numeric id (8888):

  • Works reliably in scratch/distroless images
  • Satisfies Kubernetes runAsNonRoot: true enforcement, which checks that the effective UID is non-zero (numeric lookup, not name-based)
  • Gives predictable, consistent identity across all image variants and runtimes
  • Follows OCI and Kubernetes best-practice guidance to always specify USER as a numeric id

The UID/GID 8888 is in the unprivileged range, avoids conflicts with typical system UIDs, and is consistent with common container hardening practices.

Using a symbolic username in the USER directive can fail in minimal
or distroless environments where /etc/passwd is absent. Pinning to a
fixed numeric id (8888) ensures consistent, predictable identity
across all image variants and satisfies Kubernetes runAsNonRoot
enforcement without requiring a username lookup at runtime.

Closes curl#25
@xquery
Copy link
Copy Markdown
Member

xquery commented Apr 11, 2026

apologies for the belated response on this - LGTM - please rebase and we will get it merged in.

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.

Use numeric id for USER

2 participants