1
0
mirror of https://github.com/docker/cli.git synced 2026-01-26 15:41:42 +03:00
Commit Graph

12190 Commits

Author SHA1 Message Date
Sebastiaan van Stijn
63c5254201 remove support for AutoRemove (--rm) on API < 1.30
Support for daemon-side auto-remove was added in API v1.25; on older
versions of the daemon, the client was responsible for removing the
container after it exited (see [moby@6dd8e10])

On API versions < 1.30, it used the events API for this purpose, and
would wait for a "die", "detach" or "detroy" events to know the container
exited, and could be removed or (when attached, but without a TTY) to
get the container's exit-status. (see [cli@38591f2]).

API version 1.24 (docker 1.12) is 9 Years old (July 29, 2016), and API
1.30 (docker 17.06) is 8 Years old (Jun 20, 2017), and long EOL. While
technically, a CLI could negotiate API 1.30 or older, this would only
be in cases where either API version negotiation failed, or the version
was explicitly overridden through `DOCKER_API_VERSION` for testing.

Either of those cases would be rare, and not worth the technical complexity
to support. This patch removes support for AutoRemove on API < 1.30.

[moby@6dd8e10]: 6dd8e10d6e
[cli@38591f2]: 38591f20d0

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-30 18:16:57 +02:00
Sebastiaan van Stijn
1b90a53be2 remove deprecated VirtualSize formatting options and output
The `VirtualSize` field was deprecated in [moby@1261fe6], and omitted / removed
in API v1.44 in [moby@913b0f5], and the corresponding formatting placeholder
was deprecated in [cli@f02301a].

This patch removes the formatting function, which also removes it from the
`docker image ls --format=json` output.

[moby@1261fe6]: 1261fe69a3
[moby@913b0f5]: 913b0f51ca
[cli@f02301a]: f02301ab5d

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-30 16:31:57 +02:00
Sebastiaan van Stijn
c361deb85d docs, man: image ls: remove VirtualSize from examples
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-30 16:26:06 +02:00
Sebastiaan van Stijn
adfcb88896 man: inspect: update some inspect examples
remove various deprecated fields from the example

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-30 16:23:19 +02:00
Austin Vazquez
9c79528489 Merge pull request #6523 from thaJeztah/rm_deprecated
cli/manifest/store: remove deprecated IsNotFound
2025-09-30 05:36:34 -07:00
Austin Vazquez
9874437110 Merge pull request #6521 from thaJeztah/bump_moby
vendor: github.com/moby/moby/api, moby/client master
2025-09-30 05:35:30 -07:00
Sebastiaan van Stijn
39d9a0cd51 cli/manifest/store: remove deprecated IsNotFound
This was deprecated in f3fb7728c7, which
is part of 28.5.0, and no longer used.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-30 12:59:02 +02:00
Sebastiaan van Stijn
9d97363f8f vendor: github.com/moby/moby/api, moby/client master
full diff: 9a97f59e6e...4ca8aedf92

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-30 10:43:02 +02:00
Sebastiaan van Stijn
21e768adb7 Merge pull request #6520 from thaJeztah/bump_moby
vendor: github.com/moby/moby/api, moby/client master
2025-09-30 09:31:05 +02:00
Sebastiaan van Stijn
cdcf267264 vendor: github.com/moby/moby/api, moby/client master
full diff: e98849831f...9a97f59e6e

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-29 18:00:59 -05:00
Austin Vazquez
f8932e916b Merge pull request #6515 from thaJeztah/rm_authconfig_email
cli/config/types: remove deprecated AuthConfig.Email field
2025-09-29 16:00:21 -07:00
Sebastiaan van Stijn
e9664b9f34 cli/config/types: remove deprecated AuthConfig.Email field
Relates to [cli@27b2797], which forked this type from the Moby API, and
[cli@aab947d], which fixed the deprecation comment.

This field is no longer used since Docker 1.11 (API version 1.23) through
[moby@aee260d] and [engine-api@9a9e468], and the fix of the deprecation
comment was included in the 28.4.0 release.

This patch removes the field.

[cli@27b2797]: 27b2797f7d
[cli@aab947d]: aab947de8f
[moby@aee260d]: aee260d4eb
[engine-api@9a9e468]: 9a9e468f50

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-29 17:50:54 -05:00
Austin Vazquez
a61ecaf3c7 Merge pull request #6516 from thaJeztah/authconfig_no_direct_cast
cli/command: explicitly map AuthConfig fields instead of a direct cast
2025-09-29 15:49:22 -07:00
Austin Vazquez
7e8b893952 Merge pull request #6517 from thaJeztah/memstore_notfounderr
cli/config/memorystore: remove unused IsErrValueNotFound
2025-09-29 15:13:24 -07:00
Austin Vazquez
5a4758f513 Merge pull request #6513 from thaJeztah/manifeststore_notfound
cli/manifest/store: deprecate IsNotFound
2025-09-29 15:11:13 -07:00
Austin Vazquez
1b467f909c Merge pull request #6512 from thaJeztah/less_trust
remove some uses of trust-specific types
2025-09-29 15:02:31 -07:00
Sebastiaan van Stijn
3c78ac2aad cli/config/memorystore: remove unused IsErrValueNotFound
This utility was added in 9b83d5bbf9, but
was never used. Remove the utility, and rewrite the error returned to
implement the errdefs.NotFound interface, so that it can be detected
using the errdefs.IsNotFound() utility if needed.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-29 13:05:08 +02:00
Sebastiaan van Stijn
9f02d9643d cli/command: explicitly map AuthConfig fields instead of a direct cast
Commit [cli@27b2797] forked the AuthConfig type from the API, and changed
existing code to do a direct cast / convert of the forked type to the API
type. This can cause issues if the API types diverges, such as the removal
of the Email field.

This patch explicitly maps each field to the corresponding API type, but
adds some TODOs, because various code-paths only included a subset of the
fields, which may be intentional for fields that were meant to be handled
on the daemon / registry-client only.

We should evaluate these conversions to make sure these fields should
be sent from the client or not (and possibly even removed from the API
type).

[cli@27b2797]: 27b2797f7d

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-29 12:57:52 +02:00
Sebastiaan van Stijn
f3fb7728c7 cli/manifest/store: deprecate IsNotFound
Deprecate the IsNotFound utility in favor of errdefs.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-26 23:33:01 +02:00
Sebastiaan van Stijn
0dec83f572 cli/command/image: imagePullPrivileged: move to non-trust file
This function is a wrapper around apiClient.ImagePull and not directly
related to docker content trust; it just happens to also be called
when using content trust (through the trustedPull utility).

Move it together with the `runPull` function to separate it from
trust-related code.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-26 20:06:32 +02:00
Sebastiaan van Stijn
e58a6ace45 cli/command/image: imagePullPrivileged: don't use ImageRefAndAuth
This function is a wrapper around apiClient.ImagePull; the use of
trust.ImageRefAndAuth was out of convenience because it's also called
when using content trust (through the trustedPull utility).

Let's pull away the layers to separate it from trust code.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-26 20:06:32 +02:00
Sebastiaan van Stijn
a6946d0fbf cli/command/image: notaryClientProvider: don't require arguments
This interface is used in tests to provide a dummy notary client,
but none of the tests require any arguments, so let's remove them.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-26 20:06:26 +02:00
Sebastiaan van Stijn
c3317b0a43 cli/trust: Server: accept registry hostname
The IndexInfo was only used to detect if the target was an official
image, which we can deduct from the hostname. Adding some normalizing
just in case (but we should only get "docker.io" here).

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-26 18:51:32 +02:00
Sebastiaan van Stijn
75f3c08257 Merge pull request #6505 from thaJeztah/bump_runewidth
vendor: github.com/mattn/go-runewidth v0.0.17
2025-09-26 11:31:18 +02:00
Sebastiaan van Stijn
aaed38f5d5 Merge pull request #6507 from thaJeztah/split_trust_auth
cli/command/image: pushTrustedReference: internalize constructing indexInfo
2025-09-26 11:24:31 +02:00
Paweł Gronowski
fdf9b43ca8 Merge pull request #6506 from thaJeztah/bump_mapstructure
vendor: github.com/go-viper/mapstructure/v2 v2.4.0
2025-09-26 09:22:38 +00:00
Paweł Gronowski
95735d1631 Merge pull request #6504 from thaJeztah/bump_protobuf
vendor: google.golang.org/protobuf v1.36.9
2025-09-26 09:22:29 +00:00
Paweł Gronowski
013c41c602 Merge pull request #6508 from thaJeztah/dct_retiring
trust: print deprecation warning when using hub Notary server
2025-09-26 09:16:45 +00:00
Sebastiaan van Stijn
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
Sebastiaan van Stijn
9a6313ed3b cli/command/image: pushTrustedReference: internalize constructing indexInfo
All information needed can be deducted from the image reference, which
is used to create a indexInfo, repoInfo, and to resolve auth-config.

In some situations this may result in resolving the auth-config twice
after it already was resolved to an encoded auth-config.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-26 10:09:12 +02:00
Sebastiaan van Stijn
20e5dc9469 vendor: github.com/go-viper/mapstructure/v2 v2.4.0
full diff: https://github.com/go-viper/mapstructure/compare/v2.2.1...v2.4.0

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-25 19:47:12 +02:00
Sebastiaan van Stijn
4287f1d887 vendor: github.com/mattn/go-runewidth v0.0.17
full diff: https://github.com/mattn/go-runewidth/compare/v0.0.16...v0.0.17

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-25 19:44:27 +02:00
Sebastiaan van Stijn
746d7cb39e vendor: google.golang.org/protobuf v1.36.9
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-25 19:41:34 +02:00
Sebastiaan van Stijn
6855d70c52 Merge pull request #6503 from thaJeztah/rm_apply
cli/command: remove deprecated DockerCli.Apply
2025-09-25 18:43:28 +02:00
Sebastiaan van Stijn
1a80524834 Merge pull request #6502 from thaJeztah/rm_deprecated
cli/command: remove deprecated methods and options
2025-09-25 18:42:48 +02:00
Sebastiaan van Stijn
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
Sebastiaan van Stijn
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
Sebastiaan van Stijn
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
Sebastiaan van Stijn
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
Sebastiaan van Stijn
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
Sebastiaan van Stijn
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
Sebastiaan van Stijn
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
Sebastiaan van Stijn
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
Sebastiaan van Stijn
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
Sebastiaan van Stijn
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
Sebastiaan van Stijn
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
Sebastiaan van Stijn
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
Sebastiaan van Stijn
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
Sebastiaan van Stijn
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
Paweł Gronowski
f369c5bcf2 Merge pull request #6496 from thaJeztah/deprecate_apply
cli/command: deprecate DockerCli.Apply
2025-09-25 12:29:19 +00:00