Skip to content

Conversation

@thaJeztah
Copy link
Member


relates to:

The --tlscacert, --tlscert, and --tlskey command-line flags had non-standard behavior for handling values contained in quotes (" or '). Normally, quotes are handled by the shell, for example, in the following example, the shell takes care of handling quotes before passing the values to the docker CLI:

docker --some-option "some-value-in-quotes" ...

However, when passing values using an equal sign (=), this may not happen and values may be handled including quotes;

docker --some-option="some-value-in-quotes" ...

This caused issues with "Docker Machine", which used this format as part of its docker-machine config output, and the CLI carried special, non-standard handling for these flags.

Docker Machine reached EOL, and this special handling made the processing of flag values inconsistent with other flags used, so this behavior is deprecated. Users depending on this behavior are recommended to specify the quoted values using a space between the flag and its value, as illustrated above.

- What I did

- How I did it

- How to verify it

- Human readable description for the release notes

Deprecate special handling for quoted values for the `--tlscacert`, `--tlscert`, and `--tlskey` command-line flags

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

The `--tlscacert`, `--tlscert`, and `--tlskey` command-line flags had
non-standard behavior for handling values contained in quotes (`"` or `'`).
Normally, quotes are handled by the shell, for example, in the following
example, the shell takes care of handling quotes before passing the values
to the `docker` CLI:

    docker --some-option "some-value-in-quotes" ...

However, when passing values using an equal sign (`=`), this may not happen
and values may be handled including quotes;

    docker --some-option="some-value-in-quotes" ...

This caused issues with "Docker Machine", which used this format as part
of its `docker-machine config` output, and the CLI carried special, non-standard
handling for these flags.

Docker Machine reached EOL, and this special handling made the processing
of flag values inconsistent with other flags used, so this behavior is
deprecated. Users depending on this behavior are recommended to specify
the quoted values using a space between the flag and its value, as illustrated
above.

Signed-off-by: Sebastiaan van Stijn <[email protected]>
(cherry picked from commit ee05a71)
Signed-off-by: Sebastiaan van Stijn <[email protected]>
@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@thaJeztah
Copy link
Member Author

Flaky test;

=== Failed
=== FAIL: e2e/registry TestOauthLogin (1.01s)
    login_test.go:28: terminating PID 9678
    login_test.go:33: assertion failed: expression is false: strings.Contains(string(output), "USING WEB-BASED LOGIN"): Failed to start web-based login - falling back to command line login...
        
        Log in with your Docker ID or email address to push and pull images from Docker Hub. If you don't have a Docker ID, head over to https://hub.docker.com/ to create one.
        You can log in with your password or a Personal Access Token (PAT). Using a limited-scope PAT grants better security and is required for organizations using SSO. Learn more at https://docs.docker.com/go/access-tokens/
        
        Username: 

@thaJeztah thaJeztah merged commit 6adde56 into docker:28.x Aug 18, 2025
117 of 119 checks passed
@thaJeztah thaJeztah deleted the 28.x_backport_deprecate_quoted_values branch August 18, 2025 16:35
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