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

12208 Commits

Author SHA1 Message Date
Sebastiaan van Stijn
b8b4f54a89 fix typo in TODO comment
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-10-31 03:15:47 +01:00
Sebastiaan van Stijn
03fb1df2dd Merge pull request #6577 from docker/dependabot/github_actions/actions/upload-artifact-5
build(deps): bump actions/upload-artifact from 4 to 5
2025-10-31 03:02:22 +01:00
Sebastiaan van Stijn
58e3de8781 Merge pull request #6594 from thaJeztah/dont_push_me
cli/trust: use local definition for PushResult Aux message
2025-10-31 02:13:01 +01:00
Sebastiaan van Stijn
65496c5557 cli/trust: use local definition for PushResult Aux message
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-10-30 20:22:25 +01:00
Sebastiaan van Stijn
3434869388 Merge pull request #6591 from vvoland/update-docker
vendor: github.com/moby/moby master
2025-10-30 00:32:57 +01:00
Sebastiaan van Stijn
9dde80abd8 Merge pull request #6574 from vvoland/img-dangling
image/list: Hide untagged images without `--all`
2025-10-30 00:24:29 +01:00
Paweł Gronowski
e636a2a069 cli/container_rename: Move to API validation
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-10-30 00:20:47 +01:00
Paweł Gronowski
af255accaa vendor: github.com/moby/moby master
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-10-30 00:02:41 +01:00
Paweł Gronowski
fcac1d5b2a Merge pull request #6586 from thaJeztah/bump_modules
vendor: github.com/moby/moby/api, moby/moby/client master
2025-10-29 23:53:04 +01:00
Sebastiaan van Stijn
053aa376ea vendor: github.com/moby/moby/api, moby/moby/client master
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-10-29 23:17:29 +01:00
Sebastiaan van Stijn
606f1c65d0 Merge pull request #6584 from thaJeztah/bump_modules
vendor: github.com/moby/moby/api, moby/moby/client master
2025-10-28 19:26:27 +01:00
Sebastiaan van Stijn
83319f09f7 cli/command/container: use per-stats OSType if present
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-10-28 16:27:00 +01:00
Sebastiaan van Stijn
6ed16a2cc1 vendor: github.com/moby/moby/api, moby/moby/client master
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-10-28 16:26:53 +01:00
Sebastiaan van Stijn
10281ff5a5 Merge pull request #6583 from thaJeztah/stats_cleanups
cli/command/container: cleanup stats code
2025-10-28 15:17:20 +01:00
Sebastiaan van Stijn
5007c96b0d cli/command/container: collect(): split windows/unix branches
Use separate branches to handle windows/unix results to reduce intermediate
variables, and make it more transparent what's set for each platform.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-10-28 15:08:05 +01:00
Sebastiaan van Stijn
c467ebafd8 cli/command/container: calculateCPUPercentWindows minor cleanup
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-10-28 15:08:05 +01:00
Sebastiaan van Stijn
689152a804 cli/command/container: calculateCPUPercentUnix: simplify
Pass the whole CPUStats struct instead of deconstructing it to separate
variables.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-10-28 15:07:58 +01:00
Sebastiaan van Stijn
e809e65ba6 Merge pull request #6582 from thaJeztah/fix_stats_cancellation
cli/command/container: RunStats: simplify, and fix context-cancellation
2025-10-28 14:12:16 +01:00
Sebastiaan van Stijn
e01ce69ff9 cli/command/container: collect: handle context-cancellation
construct the decoder inside the go-routine, including closing the body,
and add handling for context-cancellation.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-10-28 13:29:43 +01:00
Sebastiaan van Stijn
292001a451 cli/command/container: RunStats: early return for non-streaming
We should consider splitting this out to a separate function, but
start with just an early return before we hit the timer-loop.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-10-28 12:36:14 +01:00
Sebastiaan van Stijn
0b1c7bc0f1 cli/command/container: RunStats: small tweaks on closeChan
Some suggestions from ChatGPT to prevent deadlocks.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-10-28 12:36:10 +01:00
Sebastiaan van Stijn
d309027d58 cli/command/container: RunStats: gracefully handle io.EOF
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-10-28 12:08:55 +01:00
Sebastiaan van Stijn
15b422b317 cli/command/container: RunStats: handle context-cancellation
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-10-28 12:08:54 +01:00
Sebastiaan van Stijn
832fc66ca7 cli/command/container: RunStats: simplify stats loop
Use a single select for the ticker and the closeChan; use early returns.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-10-28 12:08:54 +01:00
Sebastiaan van Stijn
dad1d367c8 cli/command/container: move debug logs to call-site
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-10-28 12:08:54 +01:00
Austin Vazquez
e50c94f21a Merge pull request #6581 from thaJeztah/stats_ostype
cli/command/container: don't depend on result.OSType
2025-10-27 21:43:53 -05:00
Austin Vazquez
93cd6793b3 Merge pull request #6580 from thaJeztah/no_json
cli/command/image: remove uses of JSON field
2025-10-27 21:42:29 -05:00
Sebastiaan van Stijn
f594a7f09b cli/command/image: remove uses of JSON field
The JSON field was added in [moby@9fd2c0f], to address [moby#19177], which
reported an incompatibility with Classic (V1) Swarm, which produced a non-
standard response;

> Make docker load to output json when the response content type is json
> Swarm hijacks the response from docker load and returns JSON rather
> than plain text like the Engine does. This makes the API library to return
> information to figure that out.

A later change in [moby@96d7db6] added additional logic to make sure the
correct content-type was returned, depending on whether the `quiet` option
was set (which produced a non-JSON response). This caused inconsistency in
the API response, and [moby@2f27632] changed the endpoint to always produce
JSON (only skipping the "progress" output if `quiet` was set).

This means that the "load" endpoint ([`imageRouter.postImagesLoad`]) now
unconditionally returns JSON, making the `JSON` field fully redundant.

This patch removes the use of the JSON field, as it's redundant, and the way it handles
the content-type is incorrect because it would not handle correct, but different
formatted response-headers (`application/json; charset=utf-8`), which could
result in malformed output on the client.

[moby@9fd2c0f]: 9fd2c0feb0
[moby#19177]: https://github.com/moby/moby/issues/19177
[moby@96d7db6]: 96d7db665b
[moby@2f27632]: 2f27632cde
[`imageRouter.postImagesLoad`]: 7b9d2ef6e5/api/server/router/image/image_routes.go (L248-L255)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-10-27 21:37:36 +01:00
Sebastiaan van Stijn
4b498addce cli/command/container: don't depend on result.OSType
This field is set for the request as a whole, so can be obtained
from the server-info instead. Docker v29 will provide per-stats
information.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-10-27 21:35:25 +01:00
Sebastiaan van Stijn
715467c9d8 Merge pull request #6569 from jsternberg/otel-sdk-lock-version
telemetry: lock the semconv version of the otel sdk
2025-10-27 21:17:09 +01:00
Sebastiaan van Stijn
dafbfc2f7e Merge pull request #6576 from robmry/bump_modules_again
vendor: github.com/moby/moby/api, moby/moby/client master
2025-10-27 20:35:49 +01:00
Rob Murray
4a608069a7 vendor: github.com/moby/moby/api, moby/moby/client master
Signed-off-by: Rob Murray <rob.murray@docker.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-10-27 20:26:27 +01:00
Jonathan A. Sternberg
153f7f10c9 telemetry: lock the semconv version of the otel sdk
This change prevents changes to the otel version from affecting the otel
sdk version. This is done by copying the telemetry sdk implementation
locally and using our own choice for semconv from within that.

This prevents a schema conflict from happening since the otel version of
the sdk gets implicitly updated whenever the semconv changes while we
have to manually change ours. Now, we manually change both and they're
locked to each other.

Signed-off-by: Jonathan A. Sternberg <jonathan.sternberg@docker.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-10-27 11:44:59 +01:00
dependabot[bot]
aef2ef8c77 build(deps): bump actions/upload-artifact from 4 to 5
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4 to 5.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-27 08:30:59 +00:00
Sebastiaan van Stijn
965a0e3518 Merge pull request #6575 from thaJeztah/bump_modules
vendor: github.com/moby/moby/api, moby/moby/client master
2025-10-26 17:40:19 +01:00
Sebastiaan van Stijn
4afbd6146b implement some ad-hoc mocks for responses
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-10-25 01:36:38 +02:00
Sebastiaan van Stijn
056e314645 vendor: github.com/moby/moby/api, moby/moby/client master
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-10-25 00:48:49 +02:00
Paweł Gronowski
64805c2959 image/list: Respect dangling filter when not using --all
Otherwise `docker images --filter dangling=true` won't work without
`--all`.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-10-24 20:46:41 +02:00
Paweł Gronowski
e9a941001c image/list: Hide untagged images without --all
The `--tree` implementation already does this.

Make the behavior consistent for the legacy image list implementation.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-10-24 20:46:41 +02:00
Sebastiaan van Stijn
f74cd147bb Merge pull request #6571 from thaJeztah/bump_modules
vendor: github.com/moby/moby/api, moby/moby/client master
2025-10-24 16:43:53 +02:00
Sebastiaan van Stijn
4f7c07cfc2 update local code for updated modules
Some tests had to be skipped as there's some issues to address, and
some of the result-types cannot be mocked / stubbed.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-10-24 10:28:54 +02:00
Sebastiaan van Stijn
aeb78091a0 vendor: github.com/moby/moby/api, moby/moby/client master
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-10-24 10:28:26 +02:00
Sebastiaan van Stijn
7b4cde6967 Merge pull request #6567 from thaJeztah/bump_modules
vendor: github.com/moby/moby/api, moby/moby/client master
2025-10-20 16:52:25 +02:00
Sebastiaan van Stijn
563f5fe335 vendor: github.com/moby/moby/api, moby/moby/client master
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-10-20 12:30:05 +02:00
Sebastiaan van Stijn
171a9b70b2 Merge pull request #6564 from vvoland/container-go123
cli/command/container: add go1.23 build constraint for range-over-func
2025-10-14 15:00:57 +02:00
Paweł Gronowski
5ba4c17d78 cli/command/container: Simplify with slices.Contains
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-10-14 14:47:59 +02:00
Paweł Gronowski
d252afa6b0 cli/command/container: add go1.23 build constraint for range-over-func
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-10-14 14:43:54 +02:00
Paweł Gronowski
bc2aa4eed1 Merge pull request #6563 from thaJeztah/bump_modules
vendor: github.com/moby/moby/api v1.52.0-beta.2, moby/client v0.1.0-beta.2
v29.0.0-rc.1
2025-10-14 11:35:31 +02:00
Sebastiaan van Stijn
24e95b8682 vendor: github.com/moby/moby/api v1.52.0-beta.2, moby/client v0.1.0-beta.2
full diff:

- https://github.com/moby/moby/compare/0769fe708773...api/v1.52.0-beta.2
- https://github.com/moby/moby/compare/0769fe708773...client/v0.1.0-beta.2

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-10-14 10:43:33 +02:00
Sebastiaan van Stijn
c844f92b58 Merge pull request #6562 from vvoland/update-go
update to go1.25.3
2025-10-14 10:28:33 +02:00