Skip to content

Pin the base image and fix runtime user creation - #16

Merged
cleemansen merged 1 commit into
mainfrom
fix/dockerfile-pin-base-image
Jul 30, 2026
Merged

cleemansen merged 1 commit into
mainfrom
fix/dockerfile-pin-base-image

Conversation

@cleemansen

@cleemansen cleemansen commented Jul 30, 2026 •

Copy link
Copy Markdown
Contributor

The image build stopped working without any commit touching it. condaforge/miniforge3:latest
moved on to Ubuntu 24.04.4, which ships neither addgroup nor adduser, so this line failed:

RUN addgroup --system $GID && adduser --system $UID --ingroup $GID

That is the build-deploy job — the one that publishes the release image to ghcr — so while it
fails, tagging a release produces nothing.

What this changes

  • groupadd/useradd instead of addgroup/adduser; the image does provide those. --create-home
    keeps the writable HOME that adduser --system used to create. That part matters: conda env create already runs as moveapps rather than root, and conda needs a writable HOME for its
    caches.
  • The base tag is pinned to 26.3.2-3 in both the runtime and the test image, so it cannot drift
    again. That tag is the same digest latest currently resolves to (sha256:70ce3950…), so this
    pins the present state rather than moving to a different one.

Verified locally (arm64): the runtime image builds, and in it the user is uid=999(moveapps) gid=999(moveapps) with a writable /home/moveapps and the conda environment in place. Starting the
image runs main.py out of /opt/cargo-agent-python/conda, so the entrypoint is intact. The test
image builds and runs its suite — Ran 4 tests in 0.053s / OK. CI additionally covers amd64.

The build stopped working without a commit touching it: `condaforge/miniforge3:latest`
moved on to a base that ships neither `addgroup` nor `adduser`, so
`RUN addgroup --system ... && adduser --system ...` failed and no release image
could be published.

Switch to `groupadd`/`useradd`, which the image does provide, and pin the base
tag in both the runtime and the test image so it cannot drift again. `--create-home`
keeps the writable HOME that `adduser --system` used to provide and that conda
needs while creating the environment.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@cleemansen cleemansen self-assigned this Jul 30, 2026
@cleemansen
cleemansen merged commit 4babd92 into main Jul 30, 2026
2 checks passed
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