Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Ignore DOCKER_AUTH_CONFIG without opt-in on Gitlab CI #6171

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

Draft
vvoland wants to merge 1 commit into docker:master
base: master
Choose a base branch
Loading
from vvoland:gitlab-auth

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)

heresie, scastlara, and mzihlmann reacted with thumbs up emoji fabriceclementz reacted with heart emoji
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 <pawel.gronowski@docker.com>
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!

@vvoland vvoland requested a review from Benehiko July 9, 2025 14:54
@vvoland vvoland modified the milestones: 28.3.2, 28.3.3 Jul 9, 2025
@thaJeztah thaJeztah modified the milestones: 28.3.3, 29.0.0 Jul 29, 2025
@thaJeztah thaJeztah modified the milestones: 29.0.0, 29.2.0 Jan 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@Benehiko Benehiko Awaiting requested review from Benehiko

At least 1 approving review is required to merge this pull request.

Projects

None yet

Milestone

29.2.0

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /