Skip to content

feat(nix): Forward DOCKER_CONFIG into the nix container so push can authenticate#338

Open
haarchri wants to merge 1 commit into
modelplaneai:mainfrom
haarchri:feature/nix-docker-config-flags
Open

feat(nix): Forward DOCKER_CONFIG into the nix container so push can authenticate#338
haarchri wants to merge 1 commit into
modelplaneai:mainfrom
haarchri:feature/nix-docker-config-flags

Conversation

@haarchri

Copy link
Copy Markdown
Contributor

Description of your changes

nix.sh runs everything inside a container, but nothing forwarded registry credentials into it. 'nix run .#push' therefore couldn't authenticate to the package registry and failed on push, even when the host had valid credentials.

When DOCKER_CONFIG is set, nix.sh now mounts that directory read-only at /dockercfg and sets DOCKER_CONFIG inside the container to point at it:

DOCKER_CONFIG=/tmp/dockercfg ./nix.sh run .#push -- --tag <tag>

When DOCKER_CONFIG is unset, nothing changes.

Fixes #

I have:

  • Read and followed Modelplane's contribution process.
  • Run nix flake check (or ./nix.sh flake check) and made sure it passes.
  • Added or updated tests covering any composition function changes.
  • Signed off every commit with git commit -s.

Signed-off-by: Christopher Haar <christopher.haar@upbound.io>
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