feat(container): pass registry auth on image pull #932

Closed
opened 2026-10-27 13:38:21 +00:00 by sam · 0 comments
Owner

internal/container/pool.go:305 calls p.cli.ImagePull(ctx, ref, client.ImagePullOptions{}) with RegistryAuth never set, so the daemon talks to the Docker Engine API with no credentials. Against a private registry (git.catlow.cloud) every pull answers 401 regardless of pull_policy.

docker login does NOT help: it writes ~/.docker/config.json, which only the CLI reads. The operator has to pull by hand with the CLI so the daemon's pull_policy=missing check finds the image already present. That workaround is currently documented in CLAUDE.md as a hard constraint rather than fixed.

Fix: populate ImagePullOptions.RegistryAuth with a base64-encoded registry.AuthConfig, sourced from ~/.docker/config.json or an explicit [containers] credential. Removes a documented footgun and makes pull_policy actually mean what it says against private registries.

Close reason

Closed


Imported from beads archie-core-1786637500404-404-1dbc182c · GitHub #425 · type task · priority P2 · created 2026-08-08 · closed 2026-10-02

internal/container/pool.go:305 calls p.cli.ImagePull(ctx, ref, client.ImagePullOptions{}) with RegistryAuth never set, so the daemon talks to the Docker Engine API with no credentials. Against a private registry (git.catlow.cloud) every pull answers 401 regardless of pull_policy. docker login does NOT help: it writes ~/.docker/config.json, which only the CLI reads. The operator has to pull by hand with the CLI so the daemon's pull_policy=missing check finds the image already present. That workaround is currently documented in CLAUDE.md as a hard constraint rather than fixed. Fix: populate ImagePullOptions.RegistryAuth with a base64-encoded registry.AuthConfig, sourced from ~/.docker/config.json or an explicit [containers] credential. Removes a documented footgun and makes pull_policy actually mean what it says against private registries. ### Close reason Closed --- _Imported from beads `archie-core-1786637500404-404-1dbc182c` · GitHub #425 · type task · priority P2 · created 2026-08-08 · closed 2026-10-02_
sam added the mediumtask labels 2026-10-27 13:38:21 +00:00
sam self-assigned this 2026-10-27 13:38:21 +00:00
sam closed this issue 2026-10-27 13:38:21 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sam/archie#932