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]>
@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

Funny thing is that I tried to get this situation by passing --label="something with quotes" and it just seemed to work without issues, but we do have a test-case testing for this, so maybe it depends on what shell you're using.

In either case, thought that announcing it as deprecated before removing the special handling wouldn't do harm.

@thaJeztah thaJeztah merged commit 5f5a5e1 into docker:master Aug 18, 2025
117 of 124 checks passed
@thaJeztah thaJeztah deleted the deprecate_quoted_values branch August 18, 2025 16:16
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