spike(ci): install a docker CLI so the registry probe can get past login (#237) #244

Closed
bermudalamb wants to merge 2 commits from spike/237-registry-docker-cli into main
Owner

Iteration 2 of the throwaway spike. One file, still workflow_dispatch only, still deleted when #237 is answered.

What the first run told us

NO BUILDX
--- socket ---
srw-rw---- 1 root root 0  /var/run/docker.sock
GITEA_TOKEN is present
docker: command not found          ← exit 127

Question 1 answered: no, the runner cannot build images as configured. The job container has no docker binary, so login failed and the three steps that mattered were skipped — no answer on whether the registry accepts a push, and no build time.

Two things it did settle, both useful:

  • /var/run/docker.sock is mounted, so the daemon is reachable and only the client is missing. That is closable from inside a step, without reconfiguring the runner.
  • GITEA_TOKEN is present, so the auth half of Question 2 is already answered.

Also 17 TB free, so disk was never a constraint.

What this changes

Adds one step that downloads the static docker CLI and checks it can reach the daemon through that socket. Static binary rather than apt: one download, no package index, no repository to add, and only the client is wanted since the daemon already exists.

The architecture is resolved with uname -m, not hardcoded. Nothing in this repository has ever confirmed what the NAS is. Assuming x86_64 would waste a whole run on the one machine everything else queues behind — the same class of mistake as assuming Portainer's build context contained .git, which is what #235 was.

That step is deliberately not continue-on-error, unlike the diagnostics above it. If the client cannot be installed there is nothing left to measure, and one clear failure reads better than three skipped steps.

What we still do not know

  • Does the registry accept a push?
  • What does a real image build cost on this runner?

Those are the two numbers that decide whether the whole approach is worth having.

Worth saying before you merge

My recommendation is still that per-merge image builds are the wrong shape here, whatever this run reports. A full CI pass is ~21.5 minutes on one serialised runner, the queue hit six deep yesterday, and the thing being bought is seven characters on an admin screen — while builtAt already answers the question that actually bit you.

If the answers come back positive, the design I would propose is release-triggered builds, not per-merge: build and push when a version is cut, Portainer pulls that tag. Same benefit, none of the queue pressure, and it pairs with the sonar.projectVersion bump that already belongs at release time.

This run is worth doing because it turns that recommendation from a guess into a decision backed by numbers.

Ref #237

Iteration 2 of the throwaway spike. One file, still `workflow_dispatch` only, still deleted when #237 is answered. ## What the first run told us ``` NO BUILDX --- socket --- srw-rw---- 1 root root 0 /var/run/docker.sock GITEA_TOKEN is present docker: command not found ← exit 127 ``` **Question 1 answered: no, the runner cannot build images as configured.** The job container has no `docker` binary, so login failed and the three steps that mattered were skipped — no answer on whether the registry accepts a push, and no build time. Two things it did settle, both useful: - **`/var/run/docker.sock` is mounted**, so the daemon is reachable and only the *client* is missing. That is closable from inside a step, without reconfiguring the runner. - **`GITEA_TOKEN` is present**, so the auth half of Question 2 is already answered. Also 17 TB free, so disk was never a constraint. ## What this changes Adds one step that downloads the static `docker` CLI and checks it can reach the daemon through that socket. Static binary rather than `apt`: one download, no package index, no repository to add, and only the client is wanted since the daemon already exists. **The architecture is resolved with `uname -m`, not hardcoded.** Nothing in this repository has ever confirmed what the NAS is. Assuming `x86_64` would waste a whole run on the one machine everything else queues behind — the same class of mistake as assuming Portainer's build context contained `.git`, which is what #235 was. That step is deliberately **not** `continue-on-error`, unlike the diagnostics above it. If the client cannot be installed there is nothing left to measure, and one clear failure reads better than three skipped steps. ## What we still do not know - Does the registry accept a push? - What does a real image build cost on this runner? Those are the two numbers that decide whether the whole approach is worth having. ## Worth saying before you merge My recommendation is still that **per-merge image builds are the wrong shape here**, whatever this run reports. A full CI pass is ~21.5 minutes on one serialised runner, the queue hit six deep yesterday, and the thing being bought is seven characters on an admin screen — while `builtAt` already answers the question that actually bit you. If the answers come back positive, the design I would propose is **release-triggered** builds, not per-merge: build and push when a version is cut, Portainer pulls that tag. Same benefit, none of the queue pressure, and it pairs with the `sonar.projectVersion` bump that already belongs at release time. This run is worth doing because it turns that recommendation from a guess into a decision backed by numbers. Ref #237
bermudalamb added 1 commit 2026-08-30 14:55:21 -05:00
spike(ci): install a docker CLI so the registry probe can get past login (#237)
SonarQube Analysis / sonarqube (pull_request) Successful in 19m45s
Linting / lint (pull_request) Successful in 2m7s
a73f7017f2
The first run answered Question 1 with a flat no. The job container has no docker binary, so login died with exit 127 and the three steps that mattered were skipped — no answer on whether the registry accepts a push, and no build time.

What it did establish is that /var/run/docker.sock is mounted. The daemon is reachable; only the client is missing. That is a gap a step can close without reconfiguring the runner, so it is worth one more iteration before deciding anything.

The static binary rather than apt: one download, no package index to refresh, no repository to add, and only the CLI is wanted since the daemon already exists on the other side of that socket.

The architecture is resolved with uname rather than hardcoded. Nothing in this repository has ever confirmed what the NAS is, and assuming x86_64 would waste a whole run on the one machine everything else queues behind — the same class of mistake as assuming Portainer's build context contained .git in #235.

This step is deliberately not continue-on-error, unlike the diagnostics above it. If the client cannot be installed there is nothing left to measure, and one clear failure reads better than three skipped steps.

Still workflow_dispatch only, still bounded by timeout-minutes, still deleted when #237 is answered.

Ref #237
bermudalamb added 1 commit 2026-08-30 16:32:24 -05:00
spike(ci): authenticate with a package-scoped PAT instead of the Actions token (#237)
SonarQube Analysis / sonarqube (pull_request) Successful in 19m38s
Linting / lint (pull_request) Successful in 2m35s
30859703d2
Iteration 2 got as far as the registry and was refused with a 401, not a certificate error, which established that everything except the credential already worked: the docker CLI installs, the daemon is reachable through the mounted socket, the container registry answers on /v2/, and TLS to the Gitea host is trusted from the runner.

The token Actions injects automatically is scoped for the repository API and is not accepted by the package registry. This switches to REGISTRY_TOKEN, a personal access token carrying write:package, which is the one thing the workflow could not arrange for itself.

Ref #237
bermudalamb closed this pull request 2026-08-30 16:35:41 -05:00

Pull request closed

This pull request cannot be reopened because the branch was deleted.
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: bermudalamb/redefined-designs#244