ci(images): decide whether the ci image bakes in the docker CLI instead of mounting the host's #349

Open
opened 2026-11-24 09:23:45 +00:00 by Claude · 0 comments
Owner

Problem

Since #345 the Molecule job mounts the runner host's docker CLI read-only into the ci container (-v "$docker_cli:/usr/local/bin/docker:ro" in .gitea/workflows/molecule.yml). The Docker driver hardcodes the community.docker.docker connection plugin, which runs the CLI, and the image has no CLI.

The mount was chosen to unblock #225, which could not wait for an image rebuild. It conflicts with the bake-in rule in images/AGENTS.md ("every tool ... a CI job uses is in its image"):

  • the CLI's version follows the host, not a pin in this repository;
  • the host binary runs on the image's newer glibc, which has not been checked.

The other uses of Docker in the job do not need the CLI. The SDK is in the image: instance create and destroy use it, and so does the per-scenario cleanup in scripts/run_molecule_scenarios.sh.

Proposal

A maintainer decides between:

  1. Keep the mount. The host job needs the CLI anyway, for docker run and the stale sweep, so the runner needs nothing new. Record it in the bake-in rule as an accepted exception, with its reason.
  2. Bake the CLI into the ci image, for example COPY --from=docker:<version>-cli@sha256:<digest> /usr/local/bin/docker /usr/local/bin/docker, pinned by digest and bumped by Renovate. Then drop the mount in the image's pin PR. The layer grows by an estimated 10 to 15 MB compressed, which must be measured and stated. A new base image is a new kind of dependency: check docs/adr/ and the Accepted risks in SECURITY.md first.
  3. Override the connection to community.docker.docker_api, which needs only the SDK, in every scenario's inventory. It is per instance, so it interacts with #166's per-run platform names.

Acceptance criteria

  • The decision and its reason are recorded: in images/AGENTS.md for option 1, in the implementing PR for options 2 and 3.
  • If 2 or 3: an implementation issue is filed and molecule.yml no longer mounts the host CLI after it lands.

Assisted-by: Claude Code

### Problem Since #345 the Molecule job mounts the runner host's `docker` CLI read-only into the `ci` container (`-v "$docker_cli:/usr/local/bin/docker:ro"` in `.gitea/workflows/molecule.yml`). The Docker driver hardcodes the `community.docker.docker` connection plugin, which runs the CLI, and the image has no CLI. The mount was chosen to unblock #225, which could not wait for an image rebuild. It conflicts with the bake-in rule in `images/AGENTS.md` ("every tool ... a CI job uses is in its image"): - the CLI's version follows the host, not a pin in this repository; - the host binary runs on the image's newer glibc, which has not been checked. The other uses of Docker in the job do not need the CLI. The SDK is in the image: instance create and destroy use it, and so does the per-scenario cleanup in `scripts/run_molecule_scenarios.sh`. ### Proposal A maintainer decides between: 1. **Keep the mount.** The host job needs the CLI anyway, for `docker run` and the stale sweep, so the runner needs nothing new. Record it in the bake-in rule as an accepted exception, with its reason. 2. **Bake the CLI into the `ci` image**, for example `COPY --from=docker:<version>-cli@sha256:<digest> /usr/local/bin/docker /usr/local/bin/docker`, pinned by digest and bumped by Renovate. Then drop the mount in the image's pin PR. The layer grows by an estimated 10 to 15 MB compressed, which must be measured and stated. A new base image is a new kind of dependency: check `docs/adr/` and the Accepted risks in `SECURITY.md` first. 3. **Override the connection to `community.docker.docker_api`**, which needs only the SDK, in every scenario's inventory. It is per instance, so it interacts with #166's per-run platform names. ### Acceptance criteria - [ ] The decision and its reason are recorded: in `images/AGENTS.md` for option 1, in the implementing PR for options 2 and 3. - [ ] If 2 or 3: an implementation issue is filed and `molecule.yml` no longer mounts the host CLI after it lands. Assisted-by: Claude Code
Claude added this to the CI velocity (emergency) milestone 2026-11-24 09:23:45 +00:00
Claude added the
Status
Ready for Human
label 2026-11-24 09:23:45 +00:00
Defame1297 removed this from the CI velocity (emergency) milestone 2026-11-24 17:03:46 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mortis/Kamino#349