Skip to content

fix: pull the backend image through the shim, not the external Compose binary (#85) - #86

Merged
dthinkr merged 1 commit into
mainfrom
fix/ghcr-pull-auth
Sep 9, 2026
Merged

dthinkr merged 1 commit into
mainfrom
fix/ghcr-pull-auth

Conversation

@dthinkr

@dthinkr dthinkr commented Sep 9, 2026

Copy link
Copy Markdown
Member

Ref #85

Follow-up to #84. The first deploy after the registry move failed at the pull step.

What happened

Login Succeeded!
Pulling backend image...
 back Error
Error response from daemon: unable to retrieve auth token: invalid username/password: unauthorized
ERROR: could not pull the backend image from the registry.
Refusing to continue, because doing so would silently redeploy the previous version.

The login succeeded and the pull immediately failed as unauthorised.

Why

On the deployment host docker is the podman compatibility shim, but docker compose hands off to a separate, real Compose binary. The two do not share a credential store — the login is recorded where podman keeps its credentials, while the external Compose binary looks for a Docker-style config.json and finds none.

So any registry that requires authentication fails under compose pull, even directly after a login that reported success. The previous registry was reached the same way, so this was latent before the move; it only surfaced now because the failure is no longer swallowed.

Fix

Pull with docker pull, which stays inside the shim and uses the credentials the login actually wrote. Compose then finds the image locally and does not need to fetch it itself. The image reference is read out of the compose file rather than duplicated, so the two cannot drift apart.

The guard worked

Worth recording: the pull is checked before any container is stopped, so the running service was never touched and stayed healthy throughout. Under the previous behaviour this same failure would have been reported as a successful deploy that shipped nothing.

🤖 Generated with Claude Code

…e binary

The first deploy after the registry move failed at the pull step with an
authorisation error, immediately after a login that reported success.

On the deployment host `docker` is the podman compatibility shim, but
`docker compose` hands off to a separate, real Compose binary. The two do not
share a credential store: the login is recorded where podman keeps its
credentials, while the external Compose binary looks for a Docker-style
config.json and finds none. Any registry requiring authentication therefore
fails under `compose pull` even directly after a successful login.

Pull with `docker pull` instead, which stays inside the shim and uses the
credentials the login actually wrote. Compose then finds the image already
present locally and does not need to fetch it. The image reference is read
from the compose file so the two cannot drift apart.

The failure itself behaved correctly: the pull is checked before any container
is stopped, so the running service was untouched and the run reported failure
rather than a success that shipped nothing.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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