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

Support DOCKER_AUTH_CONFIG to pull images from custom private registries #23

Open
zjrgov opened this issue Jul 26, 2024 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@zjrgov
Copy link
Contributor

zjrgov commented Jul 26, 2024

GitLab's runner utilizes a DOCKER_AUTH_CONFIG environment variable to access private registries at the job or runner level.

The variable is some escaped JSON that follows Docker's login config format which looks like:

{
    "auths": {
        "registry.example.com:5000": {
            "auth": "bXlfdXNlcm5hbWU6bXlfcGFzc3dvcmQ="
        }
    }
}

…where auths.[reg].auth is base64 encoded basic auth values (i.e., USER:PASS).

So we could match image registries to the keys in the auths object, decode the base64 then split on the colon and supply to cf push.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant