Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE]: Control path of docker config for publish #6775

Open
salotz opened this issue Jan 17, 2025 · 2 comments
Open

[FEATURE]: Control path of docker config for publish #6775

salotz opened this issue Jan 17, 2025 · 2 comments

Comments

@salotz
Copy link

salotz commented Jan 17, 2025

Feature Request

Background / Motivation

I am trying to run garden publish in a CI pipeline where it would be very convenient to pass the path to the docker config folder as an environment variable. In my CI system I use previous step to create the docker config.json and pass it to the garden publish task, so I have to use shell scripting to copy it to ~/.docker/config.json.

What should the user be able to do?

DOCKER_CONFIG=path/to/my/docker garden publish my-build --tag latest

Why do they want to do this? What problem does it solve?

Adds more flexibility and options to how we can configure this job. Depending on the context system some methods are easier than others. Using environment variables is usually the most easily supported.

Suggested Implementation(s)

I first tried using DOCKER_CONFIG as the documentation indicates that this is how it works.

I then understood from the logs that you are using regctl for the publish command (despite using skopeo for other tasks). So I looked in their docs to see if it was controllable by an environment variable, which it wasn't.

So either you can use a tool that supports an environment variable or create your own and map that to however that wrapped tool uses it.

How important is this feature for you/your team?

🌵 Not having this feature makes using Garden painful

@stefreak
Copy link
Member

@salotz I just checked the docs and code of regctl, and it should respect the DOCKER_CONFIG environment variable. Would it be possible for you to share an error message with us here, and/or what happens when running https://github.com/regclient/regclient directly with your config?

Thank you 👍

@salotz
Copy link
Author

salotz commented Jan 28, 2025

@stefreak Where was that in the documentation?

I don't have logs, but even then there wouldn't be anything to show this. You just get an error that you are not authorized by the registry.

I think that if you have docker also installed regctl will use that to configure its own credentials. In which case docker of course will respect that and then the process will succeed. However, in this case there is no docker for regctl to use.

Sorry for not being able to show proof, but it should be straightforward to check in a container.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants