1
0
mirror of https://github.com/docker/cli.git synced 2026-01-13 18:22:35 +03:00
Commit Graph

11712 Commits

Author SHA1 Message Date
Sebastiaan van Stijn
cdf705ce66 vendor: github.com/moby/moby/api, github.com/moby/moby/client master
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-08-27 17:12:11 +02:00
Sebastiaan van Stijn
f40caed86c Merge pull request #6376 from thaJeztah/update_TestEventsFormat
cli/command/system: TestEventsFormat: remove use of deprecated fields
2025-08-27 14:45:44 +02:00
Sebastiaan van Stijn
c558c30056 Merge pull request #6374 from thaJeztah/plugin_errs
cli/command/image: remove special handling for plugin errors on pull
2025-08-27 13:47:39 +02:00
Sebastiaan van Stijn
823c6a75b3 cli/command/system: TestEventsFormat: remove use of deprecated fields
These were just testing JSON marshaling fields that are deprecated, but
may be present in a response; these fields will be removed in future
API versions, so stop testing for them.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-08-27 13:45:05 +02:00
Sebastiaan van Stijn
7dfa471387 Merge pull request #6375 from thaJeztah/bump_modules
vendor: github.com/moby/moby/api, github.com/moby/moby/client 62884141100c
2025-08-27 12:14:47 +02:00
Sebastiaan van Stijn
10072c3548 vendor: github.com/moby/moby/api, github.com/moby/moby/client 62884141100c
full diffs:

- 7145e7666b...6288414110

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-08-27 10:21:32 +02:00
Sebastiaan van Stijn
323fbc485e cli/command/image: remove special handling for plugin errors on pull
This special handling was added in [moby@9b6dcc8], and later updated in
[moby@c127d96], but it fully depended on string-matching, which is brittle.
Testing the original ticket that lead to this handling, it looks like the
string matching no longer works, and the daemon error is returned as-is:

With graphdrivers:

    docker pull tiborvass/no-remove
    Using default tag: latest
    Error response from daemon: Encountered remote "application/vnd.docker.plugin.v0+json"(unknown) when fetching

With containerd snapshotters enabled:

    docker pull tiborvass/no-remove
    Using default tag: latest
    latest: Pulling from tiborvass/no-remove
    cf635291f7c9: Download complete
    failed to unpack image on snapshotter overlayfs: mismatched image rootfs and manifest layers

The error-message for containerd can probably be improved, but as the special
handling in the CLI no longer works, we can remove it.

[moby@9b6dcc8]: 9b6dcc8b9d
[moby@c127d96]: c127d9614f

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-08-26 23:47:17 +02:00
Austin Vazquez
701b678104 Merge pull request #6255 from thaJeztah/bump_modules
vendor: github.com/moby/moby/api, moby/moby/client 7145e7666b8f (master)
2025-08-26 13:37:06 -07:00
Sebastiaan van Stijn
7118f1fb4b vendor: github.com/moby/moby/api, moby/moby/client 7145e7666b8f (master)
full diff:

- https://github.com/docker/docker/compare/api/v1.52.0-alpha.1...7145e7666b8f
- https://github.com/docker/docker/compare/client/v0.1.0-alpha.0...7145e7666b8f

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>

WIP latest

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-08-26 20:02:30 +02:00
Sebastiaan van Stijn
212deb412d Merge pull request #6373 from thaJeztah/rm_image_AuthResolver
cli/command/image: remove deprecated AuthResolver utility
2025-08-26 19:27:22 +02:00
Sebastiaan van Stijn
481e792773 cli/command/image: remove deprecated AuthResolver utility
This function was used to share it between "trust" and "image",
but was only a shallow wrapper, so split the implementations where
used.

It was deprecated in 7ad113ccc2 and is
no longer used.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-08-26 17:46:02 +02:00
Sebastiaan van Stijn
6bc7ed8b65 Merge pull request #6372 from thaJeztah/plugin_simplify_auth
cli/command/plugin: simplify auth
2025-08-26 17:32:23 +02:00
Austin Vazquez
a2198ecd14 Merge pull request #6366 from thaJeztah/fix_email_deprecation
cli/config/types: update deprecation comment for AuthConfig.Email
2025-08-26 08:25:03 -07:00
Sebastiaan van Stijn
f2c8b9dfd3 cli/command/plugin: simplify auth
Now that 3f5b1bdd32 removed DCT, which
needed some of the intermediate types (indexInfo), we can simplify the
auth code further and just get the base64-encoded AuthConfig to be set
as header.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-08-26 16:42:34 +02:00
Sebastiaan van Stijn
cfd7e543fc Merge pull request #6370 from thaJeztah/remove_exported_config_funcs
cli/command/config: remove deprecated types and functions
2025-08-26 16:35:23 +02:00
Sebastiaan van Stijn
250e4a564c cli/command/config: remove deprecated types and functions
These were deprecated in a5f4ba08d9 and only
used internally.

This removes the deprecated types and functions:

- `RunConfigCreate` and  `CreateOptions`
- `RunConfigInspect` and `InspectOptions`
- `RunConfigList` and `ListOptions`
- `RunConfigRemove` and `RemoveOptions`

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-08-26 13:17:53 +02:00
Sebastiaan van Stijn
fda64ebc64 Merge pull request #6368 from thaJeztah/deprecate_exported_config_funcs
cli/command/config: deprecate exported types and functions
2025-08-26 13:17:12 +02:00
Sebastiaan van Stijn
a5f4ba08d9 cli/command/config: deprecate exported types and functions
These were exported in f60369dfe6 to be
used in docker enterprise, but this never happened, and there's no
known consumers of these, so we should deprecate these. External
consumers can still call the API-client directly, which should've
been the correct thing to do in the first place.

This deprecates:

- `RunConfigCreate` and  `CreateOptions`
- `RunConfigInspect` and `InspectOptions`
- `RunConfigList` and `ListOptions`
- `RunConfigRemove` and `RemoveOptions`

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-08-25 18:54:20 +02:00
Sebastiaan van Stijn
09cd4ea26c Merge pull request #6362 from thaJeztah/cleanup_formatter
cli/command/formatter: ContainerContext: assorted cleanups, fixes
2025-08-25 16:22:06 +02:00
Sebastiaan van Stijn
a6826de3e2 Merge pull request #6361 from thaJeztah/cli_trust_cleanups
cli/trust: some cleanups
2025-08-25 16:20:56 +02:00
Sebastiaan van Stijn
5bcb60aaa6 Merge pull request #6356 from thaJeztah/unexport_authresolver_util
cli/command/image: deprecate AuthResolver and un-export
2025-08-25 16:19:45 +02:00
Sebastiaan van Stijn
1beb3d4d5b Merge pull request #6355 from thaJeztah/rm_image_pull
cli/command/image: remove exported RunPull, PullOptions
2025-08-25 16:00:38 +02:00
Sebastiaan van Stijn
0395cdbd71 Merge pull request #6353 from thaJeztah/rm_json_deprecated
internal/jsonstream: remove uses of deprecated fields
2025-08-25 15:52:08 +02:00
Sebastiaan van Stijn
aab947de8f cli/config/types: update deprecation comment for AuthConfig.Email
Relates to [cli@27b2797], which forked this type from the Moby API, and
[moby@6cfff7e], which made the same change on the API side.

The Email field was originally used to create a new Docker Hub account
through the `docker login` command. The `docker login` command could be
used both to log in to an existing account (providing only username and
password), or to create a new account (providing desired username and
password, and an e-mail address to use for the new account).

This functionality was confusing, because it was implemented when Docker
Hub was the only registry, but the same functionality could not be used
for other registries. This functionality was removed in Docker 1.11 (API
version 1.23) through [moby@aee260d], which also removed the Email field
([engine-api@9a9e468]) as it was no longer used.

However, this caused issues when using a new CLI connecting with an old
daemon, as the field would no longer be serialized, and the deprecation
may not yet be picked up by custom registries, so [engine-api@167efc7]
added the field back, deprecated it, and added an "omitempty". There
was no official "deprecated" format yet at the time, so let's make sure
the deprecation follows the proper format to make sure it gets noticed.

[cli@27b2797]: 27b2797f7d
[moby@6cfff7e]: 6cfff7e880
[moby@aee260d]: aee260d4eb
[engine-api@9a9e468]: 9a9e468f50
[engine-api@167efc7]: 167efc72bb

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-08-25 15:44:04 +02:00
Sebastiaan van Stijn
5ab12e6262 Merge pull request #6365 from thaJeztah/fix_version_annotations
cli/command/service: fix API annotations for generic resource flags
2025-08-25 13:33:12 +02:00
Sebastiaan van Stijn
104b07647f Merge pull request #6363 from thaJeztah/image_push_cleanups
cli/command/image: runPush: minor cleanups and linting issues
2025-08-25 11:47:21 +02:00
Sebastiaan van Stijn
27734fdf4d Merge pull request #6349 from thaJeztah/rm_RegistryAuthenticationPrivilegedFunc
cli/command: remove deprecated RegistryAuthenticationPrivilegedFunc
2025-08-25 11:00:30 +02:00
Sebastiaan van Stijn
dcc3d25dc2 cli/command/service: fix API annotations for generic resource flags
These flags were added in 20a6ff32ee, and require
API version v1.32 or up, but they accidentally copied the flag-name from another
flag, so were not setting the annotation correctly.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-08-25 10:59:47 +02:00
Sebastiaan van Stijn
c36e67d7b6 cli/command/image: runPush: minor cleanups and linting issues
- Remove redundant intermediate variables
- Explicitly use an early return on error instead of combining with
  other checks.
- Fix unhandled errors and combine defers
- Remove outstanding TODO that unlikely will be addressed

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-08-24 19:38:24 +02:00
Sebastiaan van Stijn
4f944e245b cli/command/formatter: ContainerContext.Image: explicitly strip digest
The `reference.TrimNamed` function strips both digests and tags; the
formatter function only wants to remove the digest, but preserve any
tags present.

Update the implementation to only trim the reference if there's a digest
present, otherwise use it as-is.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-08-24 19:31:47 +02:00
Sebastiaan van Stijn
7ac3e0e0bf cli/command/formatter: ContainerContext.Image: use early returns
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-08-24 19:31:47 +02:00
Sebastiaan van Stijn
0e7d422e5f cli/command/formatter: TestContainerPsContext: add test-cases
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-08-24 19:31:46 +02:00
Sebastiaan van Stijn
7cb8147e77 cli/trust: GetNotaryRepository: inline variables
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-08-24 16:01:08 +02:00
Sebastiaan van Stijn
35a41c39a4 cli/trust: check for Digested, Tagged reference instead of Canonical
The [Canonical] interface defines images that are both [Named] and
[Digested], but in all places where it was used, we were only interested
whether the reference contained a digest. Similarly [NamedTagged] is
a superset of [Tagged], so checking for [Tagged] is sufficient if we're
already dealing with a [Named] reference.

This patch changes those checks to check for [Digested] and [Tagged]
references, as that's what's relevant for these checks.

[Named]: https://pkg.go.dev/github.com/distribution/reference#Named
[NamedTagged]: https://pkg.go.dev/github.com/distribution/reference#NamedTagged
[Canonical]: https://pkg.go.dev/github.com/distribution/reference#Canonical
[Digested]: https://pkg.go.dev/github.com/distribution/reference#Digested

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-08-24 16:00:54 +02:00
Sebastiaan van Stijn
abe4aa7893 Merge pull request #6360 from hsnabszhdn/add-missing-backticks
docs: add missing backticks in 'run.md'
2025-08-23 14:14:58 +02:00
Sebastiaan van Stijn
08f876d6e8 Merge pull request #6359 from hsnabszhdn/fix-sentence-structures-in-run-md
docs: fix sentence structures in 'run.md'
2025-08-23 14:14:24 +02:00
Austin Vazquez
0f875ba9ad Merge pull request #6351 from thaJeztah/avoid_shadowing
cli/command: rename vars for consistency and prevent shadowing
2025-08-23 02:56:49 -07:00
Hossein Abbasi
d9cafa759f docs: add missing backticks in 'run.md'
Signed-off-by: Hossein Abbasi <16090309+hsnabszhdn@users.noreply.github.com>
2025-08-23 16:14:53 +10:00
Hossein Abbasi
ba2c1c94ab docs: fix sentence structures in 'run.md'
Signed-off-by: Hossein Abbasi <16090309+hsnabszhdn@users.noreply.github.com>
2025-08-23 15:54:56 +10:00
Sebastiaan van Stijn
7ad113ccc2 cli/command/image: deprecate AuthResolver and un-export
This function was exported to share it between "trust" and "image",
but was only a shallow wrapper, so split the implementations where
used.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-08-23 03:46:14 +02:00
Sebastiaan van Stijn
9216f04eb6 cli/command/image: remove exported RunPull, PullOptions
These were exported in 812f113685, but
while the function and options are exported, the option-fields were
all un-exported, so these were not usable.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-08-23 03:35:51 +02:00
Sebastiaan van Stijn
9fd71c8347 cli/command: rename vars for consistency and prevent shadowing
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-08-23 03:04:36 +02:00
Sebastiaan van Stijn
045ac0b159 internal/jsonstream: remove uses of deprecated fields
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-08-23 02:17:20 +02:00
Sebastiaan van Stijn
03da6ad2d1 cli/command: remove deprecated RegistryAuthenticationPrivilegedFunc
This function was deprecated in 29263e865b
and is no longer used.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-08-23 00:41:07 +02:00
Sebastiaan van Stijn
1df8feb2e4 Merge pull request #6345 from thaJeztah/bump_x_sync
vendor: golang.org/x/sync v0.16.0
2025-08-22 21:05:54 +02:00
Sebastiaan van Stijn
c7cbac58b3 vendor: golang.org/x/sync v0.16.0
Brings in the errgroup implementation for reverted auto-recover from panics.

full diff: https://github.com/golang/sync/compare/v0.14.0...v0.16.0

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-08-22 14:26:38 +02:00
Sebastiaan van Stijn
e8e4588f64 Merge pull request #6344 from thaJeztah/remove_builder_newprunecommand
cli/command/trust: remove deprecated NewPruneCommand
2025-08-22 12:41:14 +02:00
Sebastiaan van Stijn
d317bc30be cli/command/trust: remove deprecated NewPruneCommand
These were deprecated in 7032f5922e, which
is part of the v28.4 release.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-08-22 12:35:36 +02:00
Sebastiaan van Stijn
832a3754e5 Merge pull request #6342 from thaJeztah/deprecate_builder_NewPruneCommand
cli/command/builder: deprecate NewPruneCommand
2025-08-22 12:35:08 +02:00
Sebastiaan van Stijn
4d4533abaa Merge pull request #6338 from thaJeztah/cleanup_formatters
cli/command: inline vars and use struct literals in formatting functions
2025-08-22 12:25:14 +02:00