Commit Graph

11908 Commits

Author SHA1 Message Date
43b03ef2c5 trust: print deprecation warning when using hub Notary server
Docker Hub's Notary service is being retired, and now produces
failures in most cases. Add a warning when attempting to use
it, pending full removal of trust;
https://www.docker.com/blog/retiring-docker-content-trust/

With this PR:

    DOCKER_CONTENT_TRUST=1 docker pull -q hello-world
    WARNING: Docker is retiring DCT for Docker Official Images (DOI).
             For details, refer to https://docs.docker.com/go/dct-deprecation/

    could not validate the path to a trusted root: unable to retrieve valid leaf certificates

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-26 11:09:07 +02:00
6855d70c52 Merge pull request #6503 from thaJeztah/rm_apply
cli/command: remove deprecated DockerCli.Apply
2025-09-25 18:43:28 +02:00
1a80524834 Merge pull request #6502 from thaJeztah/rm_deprecated
cli/command: remove deprecated methods and options
2025-09-25 18:42:48 +02:00
d719b416ab Merge pull request #6500 from thaJeztah/bump_go_events
vendor: github.com/docker/go-events v0.0.0-20250808211157-605354379745
2025-09-25 18:42:17 +02:00
008b2df526 Merge pull request #6499 from thaJeztah/bump_swarmkit
vendor: github.com/moby/swarmkit/v2 v2.1.0
2025-09-25 18:41:50 +02:00
96732f858a Merge pull request #6498 from thaJeztah/bump_jose
vendor: github.com/go-jose/go-jose/v4 v4.1.2
2025-09-25 18:41:17 +02:00
1b085a2b63 cli/command: remove deprecated DockerCli.Apply
The Apply method was added when CLI options for constructing the CLI were
rewritten into functional options in [cli@7f207f3]. There was no mention
in the pull request of this method specifically, and this may have been
related to work being done elsewhere on compose-on-kubernetes or the
compose-cli plugin that may have needed options to modify the CLI config
after it was already initialized.

The CLI itself no longer depends on this method since [cli@133279f], and
there are no known external users. It was deprecated in [cli@24bfedf],
which is included in the 28.5.0 release, so we can remove it for 29.0.

[cli@7f207f3]: 7f207f3f95
[cli@133279f]: 133279fb0d
[cli@24bfedf]: 24bfedf3f8

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-25 18:16:20 +02:00
b0cb6406ff cli/command: remove Apply from Cli interface
The Apply command was deprecated in 24bfedf3f8,
and has no known external users, but we didn't remove it from the interface.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-25 18:09:10 +02:00
782deffe83 cli/command: remove deprecated DockerCli.DefaultVersion
This function was used internally, but is no longer used.

This method was deprecated in 0270b2d6f7,
which was included in the 28.5.0 release, and has no known external users,
so removing it for 29.0

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-25 17:51:09 +02:00
e25843bfb6 cli/command: remove deprecated WithContentTrustFromEnv, WithContentTrust
These options were used internally as defaults for the constructor and
only impact commands implemented in the CLI itself.

They were deprecated in 40cdfc0d81, which
was included in the 28.5.0 release, so removing it for 29.0

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-25 17:47:51 +02:00
592afa8c73 cli/command: remove deprecated DockerCli.ContentTrustEnabled
This function was used internally, but is no longer used. Users should check
the value of the `DOCKER_CONTENT_TRUST` environment variable instead.

This method was deprecated in 11d40488dd,
which was included in the 28.5.0 release, and has no known external users,
so removing it for 29.0

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-25 17:42:36 +02:00
6d1c037640 vendor: github.com/docker/go-events v0.0.0-20250808211157-605354379745
full diff: c867878c5e...6053543797

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-25 15:13:31 +02:00
9cba658e9a vendor: github.com/moby/swarmkit/v2 v2.1.0
full diff: https://github.com/moby/swarmkit/compare/v2.0.0...v2.1.0

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-25 15:07:05 +02:00
57314d42a2 vendor: github.com/go-jose/go-jose/v4 v4.1.2
full diff: https://github.com/go-jose/go-jose/compare/v4.0.5...v4.1.2

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-25 14:58:11 +02:00
e922dbefca vendor: golang.org/x/crypto v0.39.0
no changes in vendored files

full diff: https://github.com/golang/crypto/compare/v0.37.0...v0.39.0

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-25 14:58:05 +02:00
286658d7ff vendor: golang.org/x/text v0.26.0
no changes in vendored files

full diff: https://github.com/golang/text/compare/v0.24.0...v0.26.0

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-25 14:55:03 +02:00
90959c40bd vendor: golang.org/x/term v0.32.0
full diff: https://github.com/golang/term/compare/v0.31.0...v0.32.0

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-25 14:54:18 +02:00
f369c5bcf2 Merge pull request #6496 from thaJeztah/deprecate_apply
cli/command: deprecate DockerCli.Apply
2025-09-25 12:29:19 +00:00
24bfedf3f8 cli/command: deprecate DockerCli.Apply
The Apply method was added when CLI options for constructing the CLI were
rewritten into functional options in [cli@7f207f3]. There was no mention
in the pull request of this method specifically, and this may have been
related to work being done elsewhere on compose-on-kubernetes or the
compose-cli plugin that may have needed options to modify the CLI config
after it was already initialized.

The CLI itself no longer depends on this method since [cli@133279f], and
the only known consumer (docker compose) no longer needs it since [cli@2711800]
and [cli@048e931].

This patch deprecates the method with the intent to remove it in a future
release.

[cli@7f207f3]: 7f207f3f95
[cli@133279f]: 133279fb0d
[cli@2711800]: 2711800430
[cli@048e931]: 048e931b42

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-25 13:27:28 +02:00
ef3c19a80b Merge pull request #6494 from thaJeztah/deprecate_ContentTrustEnabled
cli/command: deprecate DockerCli.ContentTrustEnabled
2025-09-25 11:24:05 +00:00
11d40488dd cli/command: deprecate DockerCli.ContentTrustEnabled
This function was used internally, but is no longer used. Users should check
the value of the `DOCKER_CONTENT_TRUST` environment variable instead.

There are no known external users of this method, so already removing it
from the Cli interface; this method will be removed in the next release.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-25 12:45:13 +02:00
1bae6aafa8 trust: add internal utility for checking DOCKER_CONTENT_TRUST
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-25 12:45:08 +02:00
1ace9aec34 cli/command: don't use DCT status for trust stub-flags
This is a follow-up to 7609dde8d0 and
3f5b1bdd32, which removed support for
DCT for build and plugin commands.

As these flags are just stubs, hidden by default and no longer functional,
they don't have to reflect the current state of DCT.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-25 12:39:28 +02:00
734328eef9 Merge pull request #6492 from thaJeztah/fix_alpine
e2e: update openssh, openssl to work around openssh bug
2025-09-25 11:39:52 +02:00
9c88b315ef Merge pull request #6488 from thaJeztah/deprecate_dct_opts
cli/command: deprecate WithContentTrustFromEnv, WithContentTrust
2025-09-25 11:31:55 +02:00
04bfe7dc78 Merge pull request #6490 from thaJeztah/deprecate_defaultversion
cli/command: deprecate DockerCli.DefaultVersion
2025-09-25 11:31:27 +02:00
b611f288ee e2e: update openssh, openssl to work around openssh bug
relates to https://gitlab.alpinelinux.org/alpine/aports/-/issues/17547

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-25 10:57:14 +02:00
40cdfc0d81 cli/command: deprecate WithContentTrustFromEnv, WithContentTrust
These options were used internally as defaults for the constructor and
only impact commands implemented in the CLI itself.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-25 09:57:28 +02:00
0270b2d6f7 cli/command: deprecate DockerCli.DefaultVersion
This function was used internally, but is no longer used. There are
no known users of this method, so already removing it from the Cli
interface.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-25 09:38:46 +02:00
903e9b3426 Merge pull request #6453 from thaJeztah/rm_deprecated_template
templates: remove deprecated NewParse function
2025-09-24 10:40:45 -07:00
a44144e1db Merge pull request #6479 from thaJeztah/plugin_semverish
cli-plugins/manager: allow schema-versions <= 2.0.0
2025-09-24 19:25:43 +02:00
ed7908e4ed Merge pull request #4574 from milas/cli-user-agent
cli/command: add WithUserAgent option
2025-09-24 19:16:38 +02:00
048e931b42 cli/command: add WithUserAgent option
Add support to the `cli/command` package to accept a custom User
Agent to pass to the underlying client.

This is used as the `UpstreamClient` portion of the `User-Agent`
when the Moby daemon makes requests.

For example, pushing and pulling images with Compose might result
in the registry seeing a `User-Agent` value of:

```
docker/24.0.7 go/go1.20.10 git-commit/311b9ff kernel/6.5.13-linuxkit os/linux arch/arm64 UpstreamClient(docker-cli-plugin-compose/v2.24.0)
```

Signed-off-by: Milas Bowman <milas.bowman@docker.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-24 17:43:41 +02:00
ec912e5524 cli-plugins/manager: allow schema-versions <= 2.0.0
The CLI currently hard-codes the schema-version for CLI plugins to
"0.1.0", which doesn't allow us to expand the schema for plugins.

As there's many plugins that we shipped already, we can't break
compatibility until we reach 2.0.0, but we can expand the schema
with non-breaking changes.

This patch makes the validation more permissive to allow new schema
versions <= 2.0.0. Note that existing CLIs will still invalidate
such versions, so we cannot update the version until such CLIs are
no longer expected to be used, but this patch lays the ground-work
to open that option.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-24 16:17:33 +02:00
8fbb70ae56 Merge pull request #6475 from thaJeztah/cli_plugin_options
cli-plugins/plugin: Run: allow customizing the CLI
2025-09-24 07:15:24 -07:00
f3687d8a8b Merge pull request #5922 from thaJeztah/ignore_broken_symlinks
cli-plugins/manager: ignore broken symlinks
2025-09-24 15:10:23 +02:00
9b2f831452 cli-plugins/manager: ignore broken symlinks
Before this patch, a broken symlink would print a warning;

    docker info > /dev/null
    WARNING: Plugin "/Users/thajeztah/.docker/cli-plugins/docker-feedback" is not valid: failed to fetch metadata: fork/exec /Users/thajeztah/.docker/cli-plugins/docker-feedback: no such file or directory

After this patch, such symlinks are ignored:

    docker info > /dev/null

With debug enabled, we don't ignore the faulty plugin, which will
make the warning shown on docker info;

    mkdir -p ~/.docker/cli-plugins
    ln -s nosuchplugin ~/.docker/cli-plugins/docker-brokenplugin
    docker --debug info
    Client:
     Version:    29.0.0-dev
     Context:    default
     Debug Mode: true
     Plugins:
      buildx: Docker Buildx (Docker Inc.)
        Version:  v0.25.0
        Path:     /usr/libexec/docker/cli-plugins/docker-buildx
    WARNING: Plugin "/Users/thajeztah/.docker/cli-plugins/docker-brokenplugin" is not valid: failed to fetch metadata: fork/exec /Users/thajeztah/.docker/cli-plugins/docker-brokenplugin: no such file or directory

    # ...

We should als consider passing a "seen" map to de-duplicate entries.
Entries can be either a direct symlink or in a symlinked path (for
which we can filepath.EvalSymlinks). We need to benchmark the overhead
of resolving the symlink vs possibly calling the plugin (to get their
metadata) further down the line.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-24 14:32:37 +02:00
2711800430 cli-plugins/plugin: Run: allow customizing the CLI
Currently, the plugin.Run command constructs the DockerCli using
the default options, assuming plugins run with all the same options
as the CLI itself; to customize the CLI there's a "Apply" option,
but this means mutating the CLI after it's already constructed, which
is not ideal.

This patch adds a variadic ops argument to allow CLI plugins to pass
custom options to use for the CLI, so that there's no need to mutate
its config in most cases.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-24 14:17:15 +02:00
84520653d8 templates: remove deprecated NewParse function
This was deprecated in 7ab3e7e774 and
no longer used.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-24 14:08:27 +02:00
c8600e1cea Merge pull request #6463 from thaJeztah/remove_oauth_escape_hatch
remove DOCKER_CLI_DISABLE_OAUTH_LOGIN escape hatch
2025-09-24 13:43:42 +02:00
4a4043cdb6 Merge pull request #6462 from thaJeztah/rm_deprecated_registryclient
remove deprecated cli/registry/client package
2025-09-24 13:18:58 +02:00
7cc801d93d Merge pull request #6467 from thaJeztah/no_apply
cli/command: NewDockerCli: don't depend on DockerCli.Apply
2025-09-24 13:17:51 +02:00
7afda4c6c5 Merge pull request #6468 from thaJeztah/cli_plugins_touchup
cli-plugins/plugin: Run: touch-up godoc and minor cleanups
2025-09-24 13:17:38 +02:00
550d40f7bc Merge pull request #6466 from thaJeztah/registry_3
e2e: use registry v3
2025-09-24 13:17:23 +02:00
5710de6d9a Merge pull request #6461 from thaJeztah/bump_xx
Dockerfile: update xx to v1.7.0
2025-09-24 13:17:13 +02:00
93bb8a7a0a Merge pull request #6458 from thaJeztah/bump_engine
vendor: github.com/moby/moby/api, github.com/moby/moby/client master
2025-09-24 13:16:39 +02:00
b1d45285ba Merge pull request #6464 from thaJeztah/remove_deprecated_experimental
cli/config/configfile: remove deprecated ConfigFile.Experimental field
2025-09-24 13:15:54 +02:00
4c802a1548 Merge pull request #6465 from thaJeztah/rm_23_test
gha: update test-matrix: remove docker 23.x, 26.x, add 25.x
2025-09-24 13:15:27 +02:00
635a718209 cli-plugins/plugin: Run: touch-up godoc and minor cleanups
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-24 12:57:42 +02:00
133279fb0d cli/command: NewDockerCli: don't depend on DockerCli.Apply
The Apply method was added when CLI options for constructing the CLI were
rewritten into functional options in [cli@7f207f3]. There was no mention
in the pull request of this method specifically, and this may have been
related to work being done elsewhere on compose-on-kubernetes or the
compose-cli plugin that may have needed options to modify the CLI config
after it was already initialized.

We should try to remove functions that mutate the CLI configuration after
initialization if possible (and likely remove the `Apply` method); currently
this function is used in docker compose, but as part of a hack that can
probably be avoided.

[cli@7f207f3]: 7f207f3f95

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-24 12:10:57 +02:00