Skip to content

Conversation

vvoland
Copy link
Collaborator

@vvoland vvoland commented Jul 9, 2025

This is a hot-fix that prevents using the DOCKER_AUTH_CONFIG env-var as a credential helper when running in Gitlab CI (determined by GITLAB_CI environment variable).

An explicit setting controlling this behavior is available through the auth_config_order feature flag in the Docker CLI config (and DOCKER_AUTH_ORDER environment variable that takes precedence over the feature flag value).

It accepts a comma separated "config" and "env" strings which determine the order.

Currently, possible values are:

  • "config,env" - prefer the auth from config.json first
  • "env,config" - prefer the auth from DOCKER_AUTH_CONFIG
{
    ...,
    "features": {
        "auth_config_order": "config,env"
    }
}

- What I did

- How I did it

- How to verify it

- Human readable description for the release notes

Temporarily disable `DOCKER_AUTH_CONFIG` taking precedence on Gitlab CI by default. The behavior can be explicitly defined with `DOCKER_AUTH_ORDER=env,config` or `~/.docker/config.json` feature flag: `{ ..., "features": { "auth_config_order": "env,config" } }`

- A picture of a cute animal (not mandatory but encouraged)

This is a hot-fix that prevents using the `DOCKER_AUTH_CONFIG` env-var
as a credential helper when running in Gitlab CI (determined by
`GITLAB_CI` environment variable).

An explicit setting controlling this behavior is available through the
`auth_config_order` feature flag in the Docker CLI config (and
`DOCKER_AUTH_ORDER` environment variable that takes precedence over the
feature flag value).

It accepts a comma separated "config" and "env" strings which determine
the order.

Currently, possible values are:
- "config,env" - prefer the auth from config.json first
- "env,config" - prefer the auth from `DOCKER_AUTH_CONFIG`

```json ~/.docker/config.json
{
    ...,
    "features": {
        "auth_config_order": "config,env"
    }
}
```

Signed-off-by: Paweł Gronowski <[email protected]>
@vvoland vvoland added this to the 28.3.2 milestone Jul 9, 2025
@vvoland vvoland self-assigned this Jul 9, 2025
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 85.96491% with 8 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
cli/config/configfile/file.go 83.33% 4 Missing and 1 partial ⚠️
cli/command/registry/logout.go 0.00% 3 Missing ⚠️

📢 Thoughts on this report? Let us know!

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

Successfully merging this pull request may close these issues.

3 participants