Skip to content

fix(docker): align Dockerfile with current ARC base image (mambauser)#175

Merged
alongd merged 1 commit into
ReactionMechanismGenerator:mainfrom
alongd:fix-dockerfile-mambauser
Jul 7, 2026
Merged

fix(docker): align Dockerfile with current ARC base image (mambauser)#175
alongd merged 1 commit into
ReactionMechanismGenerator:mainfrom
alongd:fix-dockerfile-mambauser

Conversation

@alongd

@alongd alongd commented Jul 7, 2026

Copy link
Copy Markdown
Member

Problem

The Docker image build (docker_build.ymlci-check) fails at the git clone step with:

unable to find user rmguser: no matching entries in passwd file

Root cause: the base image laxzal/arc:latest was rebuilt on the modern ARC image (mambaorg/micromamba, Ubuntu 24.04), which uses the mambauser account and /home/mambauser home. The old rmguser / /home/rmguser account this Dockerfile assumed no longer exists, so USER rmguser can't resolve. The Dockerfile had also gone stale since 2024 — it referenced Python 3.7 site-packages cleanup paths (T3 is now Python 3.14) and the base image's old entrypoint path.

This is pre-existing and independent of the GitHub Actions bumps in #173 — that PR's ci-check failure is this same bug (it only surfaced there because docker_build.yml runs on changes to workflow/Dockerfile paths).

Changes

  • USER rmgusermambauser; /home/rmguser/*/home/mambauser/* throughout.
  • Inherit the base image's entrypoint (/usr/local/bin/entrywrapper.sh, which starts as root and runusers to mambauser) instead of hard-coding the removed /home/rmguser/entrywrapper.sh; end on USER root so the entrypoint can drop privileges itself.
  • Replace the hard-coded python3.7 per-package find … tests cleanups with cleanups scoped to paths that always exist, so a missing path can't break the && chain.
  • Document the inherited base-image contract at the top of the file.

Verification

The docker_build.yml ci-check job (docker build, no push) runs on this PR and is the verification gate. Base-image contract (mambauser, /home/mambauser, /usr/local/bin/entrywrapper.sh) was derived from the current ReactionMechanismGenerator/ARC Dockerfile, which laxzal/arc:latest tracks.

🤖 Generated with Claude Code

The Docker image build (docker_build.yml ci-check) has been failing with:
  git clone ... : unable to find user rmguser: no matching entries in passwd file

Root cause: the base image `laxzal/arc:latest` was rebuilt on the modern ARC
image (mambaorg/micromamba, Ubuntu 24.04), which uses the `mambauser` account
and `/home/mambauser` home — the old `rmguser` / `/home/rmguser` account this
Dockerfile assumed no longer exists. The file had also gone stale since 2024:
it referenced Python 3.7 site-packages cleanup paths (T3 is now Python 3.14)
and the base image's old entrypoint path.

Changes:
- USER rmguser -> mambauser; /home/rmguser/* -> /home/mambauser/* throughout.
- Inherit the base image's entrypoint (/usr/local/bin/entrywrapper.sh, which
  starts as root and runuser's to mambauser) instead of hard-coding the old
  /home/rmguser/entrywrapper.sh path; end on USER root so it can do so.
- Replace the hard-coded python3.7 per-package `find ... tests` cleanups with
  cleanups scoped to paths that always exist, so a missing path can't break
  the && chain.
- Document the inherited base-image contract at the top of the file.

Not caused by (and independent of) the GitHub Actions bumps in ReactionMechanismGenerator#173; that PR's
docker ci-check failure is this same pre-existing bug.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

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.

Pull request overview

Aligns the project Docker build with the current laxzal/arc:latest (modern ARC/micromamba) base-image contract by switching to the mambauser account layout and relying on the base entrypoint, fixing the CI docker build failure caused by the removed rmguser.

Changes:

  • Switch Dockerfile user/home paths from rmguser (/home/rmguser) to mambauser (/home/mambauser) and update working directories accordingly.
  • Stop hard-coding the legacy entrypoint; rely on the base image’s /usr/local/bin/entrywrapper.sh and finish as USER root so it can drop privileges itself.
  • Simplify image “slimming” cleanup steps to avoid brittle, version-specific site-packages paths.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Dockerfile
# Contract inherited from the base image:
# - non-root user `mambauser`, home `/home/mambauser`, code under `/home/mambauser/Code`
# - micromamba at MAMBA_ROOT_PREFIX=/opt/conda, MAMBA_DOCKERFILE_ACTIVATE=1
# - entrypoint `/usr/local/bin/entrywrapper.sh`, which starts as root and `runuser`s to mambauser
Comment thread Dockerfile
ARG MAMBA_DOCKERFILE_ACTIVATE=1
ENV ENV_NAME=t3_env

# Restore root for the inherited entrypoint (/usr/local/bin/entrywrapper.sh runuser's to mambauser)
Comment thread Dockerfile
# Clone main branch T3 repository from GitHub and set as working directory
# Clone the T3 repository into the base image's Code directory
WORKDIR /home/mambauser/Code
RUN git clone -b main https://github.com/ReactionMechanismGenerator/T3.git
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 72.69%. Comparing base (f388d3d) to head (b0e1034).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #175   +/-   ##
=======================================
  Coverage   72.69%   72.69%           
=======================================
  Files          37       37           
  Lines        5929     5929           
  Branches     1289     1289           
=======================================
  Hits         4310     4310           
  Misses       1172     1172           
  Partials      447      447           
Flag Coverage Δ
unittests 72.69% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@alongd alongd merged commit 627a815 into ReactionMechanismGenerator:main Jul 7, 2026
6 checks passed
alongd added a commit that referenced this pull request Jul 7, 2026
)

Follow-up to #175 addressing the Copilot review comments:
- Shallow, single-branch clone of T3 (`--depth 1 --single-branch`) so the
  image build fetches only the main snapshot instead of full history and all
  branches — faster build, less network transfer.
- Reword two Dockerfile comments that used the awkward/ungrammatical
  "runuser's" / "`runuser`s"; describe the privilege drop plainly.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
alongd added a commit that referenced this pull request Jul 7, 2026
fix(docker): shallow single-branch clone + comment wording (Copilot #175)
@alongd alongd deleted the fix-dockerfile-mambauser branch July 7, 2026 13:59
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.

3 participants