Compare commits

...

209 Commits

Author SHA1 Message Date
Paweł Gronowski
265f709647 Merge pull request #50247 from vvoland/50245-28.x
[28.x backport] docs: cut api docs for v1.51
2025-06-20 16:22:35 +00:00
Paweł Gronowski
b2a9318a1e docs: cut api docs for v1.51
Used by the upcoming 28.3.0 release

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
(cherry picked from commit ef50844a0b)
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-06-20 18:16:33 +02:00
Sebastiaan van Stijn
b3e2e22b2a Merge pull request #50244 from vvoland/50177-28.x
[28.x backport] gha: lower timeouts on "build" and "merge" steps
2025-06-20 17:37:41 +02:00
Sebastiaan van Stijn
c571cd8513 Merge pull request #50243 from vvoland/50238-28.x
[28.x backport] vendor: update buildkit to v0.23.1
2025-06-20 17:36:18 +02:00
Sebastiaan van Stijn
8c713c1af4 gha: lower timeouts on "build" and "merge" steps
We had some runs timeout after 120 minutes; expected duration is much
lower than that, so let's lower the timeout to make actions fail faster.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 0a30b98447)
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-06-20 16:29:08 +02:00
Paweł Gronowski
539c115023 Merge pull request #50240 from thaJeztah/28.x_backport_validate_mirrors
[28.x backport] daemon/config: Validate: add missing validation for registry mirrors and improve errors
2025-06-20 14:16:09 +00:00
CrazyMax
8e7ea470cf vendor: update buildkit to v0.23.1
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
(cherry picked from commit 5a02e7f4e3)
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-06-20 16:05:04 +02:00
Jonathan A. Sternberg
222baf4ccb vendor: github.com/moby/buildkit v0.23.0
Signed-off-by: Jonathan A. Sternberg <jonathan.sternberg@docker.com>
(cherry picked from commit e43968d7ed)
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-06-20 16:04:30 +02:00
Paweł Gronowski
1627e828d7 Merge pull request #50241 from thaJeztah/28.x_backport_update_cgroups
[28.x backport] vendor: github.com/opencontainers/cgroups v0.0.3
2025-06-20 14:00:46 +00:00
Paweł Gronowski
4070ebda88 Merge pull request #50242 from thaJeztah/28.x_backport_fix_event_ordering
[28.x backport] daemon: containerStop: fix ordering of "stop" and "die" events
2025-06-20 13:38:31 +00:00
Paweł Gronowski
b613ac489e Merge pull request #50239 from vvoland/50237-28.x
[28.x backport] Update containerd to v2.1.3
2025-06-20 11:36:57 +00:00
Sebastiaan van Stijn
0e0ca09ddc daemon: containerStop: fix ordering of "stop" and "die" events
Commit 8e6cd44ce4 added synchronisation to
wait for the container's status to be updated in memory. However, since
952902efbc, a defer was used to produce
the container's "stop" event.

As a result of the sychronisation that was added, the "die" event would
now be produced before the "stop" event.

This patch moves the locking inside the defer to restore the previous
behavior.

Unfortunately the order of events is still not guaranteed, because events
are emited from multiple goroutines that don't have synchronisation between
them; this is something to look at for follow ups. This patch keeps the status
quo and should preserve the old behavior, which was "more" correct in most
cases.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 062082ec9b)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-06-20 13:29:19 +02:00
Sebastiaan van Stijn
e62b0e2234 vendor: github.com/opencontainers/cgroups v0.0.3
- ConvertCPUSharesToCgroupV2Value: improve
- Add .github/dependabot.yml
- Remove annotations from Resources (fixes a regression introduced in v0.0.2)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit a90da2edc3)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-06-20 13:26:46 +02:00
Sebastiaan van Stijn
06ab9cd1ed daemon/config: Validate: add missing validation for registry mirrors
Validation of registry mirrors was performed during daemon startup,
but after the config-file was validated. As a result, the `--validate`
option would incorrectly print that the configuration was valid, but
the daemon would fail to start;

    echo '{"registry-mirrors":["example.com"]}' > my-config.json
    dockerd --config-file ./my-config.json --validate
    configuration OK

    dockerd --config-file ./my-config.json
    # ...
    failed to start daemon: invalid mirror: no scheme specified for "example.com": must use either 'https://' or 'http://'

With this patch applied, validation is also performed as part of the
daemon config validation;

    echo '{"registry-mirrors":["example.com"]}' > my-config.json
    dockerd --config-file ./my-config.json --validate
    unable to configure the Docker daemon with file ./my-config.json: merged configuration validation from file and command line flags failed: invalid mirror: no scheme specified for "example.com": must use either 'https://' or 'http://'

    # fix the invalid config
    echo '{"registry-mirrors":["https://example.com"]}' > my-config.json
    dockerd --config-file ./my-config.json --validate
    configuration OK

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 1d8545d60c)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-06-20 13:20:27 +02:00
Sebastiaan van Stijn
97aa4e8550 registry: ValidateMirror: improve validation for missing schemes
Before this patch, a missing scheme would sometimes produce a confusing
error message. If no scheme was specified at all, an empty "" would be
included in the message;

    echo '{"registry-mirrors":["example.com"]}' > my-config.json
    dockerd --config-file ./my-config.json
    # ...
    failed to start daemon: invalid mirror: unsupported scheme "" in "example.com"

If a scheme was missing, but a port was included, the hostname would be
printed as the scheme;

    echo '{"registry-mirrors":["example.com:8080"]}' > my-config.json
    dockerd --config-file ./my-config.json
    # ...
    failed to start daemon: invalid mirror: unsupported scheme "example.com" in "example.com:8080"

With this patch applied, the error messages are slightly more user-friendly;

    echo '{"registry-mirrors":["example.com"]}' > my-config.json
    dockerd --config-file ./my-config.json
    # ...
    failed to start daemon: invalid mirror: no scheme specified for "example.com": must use either 'https://' or 'http://'

    echo '{"registry-mirrors":["example.com:8080"]}' > my-config.json
    dockerd --config-file ./my-config.json
    # ...
    failed to start daemon: invalid mirror: no scheme specified for "example.com:8080": must use either 'https://' or 'http://'

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 307c18598d)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-06-20 13:20:26 +02:00
Derek McGowan
e18a9c95b8 Update containerd to v2.1.3
Fixes various issues with pulling from registries

Signed-off-by: Derek McGowan <derek@mcg.dev>
(cherry picked from commit b466c35da1)
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-06-20 11:28:31 +02:00
Sebastiaan van Stijn
b959bebdfc Merge pull request #50219 from thaJeztah/28.x_backport_deprecate_execconfig_detach
[28.x backport] api/types/container: deprecate ExecOptions.Detach
2025-06-18 23:03:00 +02:00
Sebastiaan van Stijn
02ade1a34c Merge pull request #50210 from thaJeztah/28.x_backport_pkg_idtools_deprecate
[28.x backport] pkg/idtools: deprecate IdentityMapping, Identity.Chown
2025-06-18 23:02:12 +02:00
Paweł Gronowski
106c4b0af6 Merge pull request #50211 from thaJeztah/28.x_backport_bump_swarmkit
[28.x backport] vendor: github.com/moby/swarmkit/v2 v2.0.0
2025-06-17 16:18:54 +00:00
Sebastiaan van Stijn
54d2eee6d6 Merge pull request #50217 from thaJeztah/28.x_backport_update-buildkit-v0.23.0-rc2
[28.x backport] vendor: update buildkit to v0.13.0-rc2
2025-06-17 15:10:47 +02:00
Sebastiaan van Stijn
09fef2b26e api/types/container: deprecate ExecOptions.Detach
This field was added in 5130fe5d38, which
added it for use as intermediate struct when parsing CLI flags (through
`runconfig.ParseExec`) in c786a8ee5e.

Commit 9d9dff3d0d rewrote the CLI to use
Cobra, and as part of this introduced a separate `execOptions` type in
`api/client/container`.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 0c182d4d57)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-06-17 13:10:50 +02:00
Tonis Tiigi
44c8cd2e8f vendor: update buildkit to v0.13.0-rc2
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit 1289519b03)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-06-17 11:36:27 +02:00
Cory Snider
78b6204f9e vendor: github.com/moby/swarmkit/v2 v2.0.0
Use the tagged version instead of the v2.0.0-20250613170222-a45be3cac15c
pseudo-version. The referenced commit has not changed.

Signed-off-by: Cory Snider <csnider@mirantis.com>
(cherry picked from commit c3ac979ecf)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-06-17 11:23:57 +02:00
Cory Snider
cf98237186 vendor: github.com/moby/swarmkit/v2 v2.0.0-20250613170222-a45be3cac15c
- fix task scheduler infinite loop

full diff: 8c19597365...a45be3cac1

Signed-off-by: Cory Snider <csnider@mirantis.com>
(cherry picked from commit 2d60b8eacd)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-06-16 17:53:26 +02:00
Sebastiaan van Stijn
fd96b01b0e pkg/idtools: deprecate IdentityMapping, Identity.Chown
The IdentityMapping and Identity types are still used internally, but
should be considered transitional.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit b7ef527bdc)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-06-16 17:40:11 +02:00
Paweł Gronowski
6a1fb46d48 Merge pull request #50169 from robmry/revert_overlay_refactoring
[28.x]: Revert overlay bug fixes / refactoring
2025-06-13 15:49:07 +00:00
Paweł Gronowski
9a9cade0df Merge pull request #50199 from vvoland/c8d-push-fixtag
c8d/push: Fix fallback single-manifest push not creating a tag
2025-06-13 13:42:50 +00:00
Paweł Gronowski
987b8a88a6 c8d/push: Extract shared push logic
Just a refactor of the previous commit to reduce duplication.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-06-13 14:51:18 +02:00
Sebastiaan van Stijn
e921abf618 Merge pull request #50198 from thaJeztah/bump_containerd
vendor: github.com/containerd/containerd/v2 v2.1.2
2025-06-13 14:39:07 +02:00
Paweł Gronowski
d9e7b86de4 c8d/push: Fix fallback single-manifest push not creating a tag
After pushing the multi-platform index fails due to missing content, we
retry with the single-platform manifest. While the target descriptor was
changed for the second push, the actual target digested reference still
pointed to the original multi-platform index. Obviously, with the
fallback that didn't really work correctly, because the multi-platform
index is not pushed.

This commit fixes the issue by updating the target reference to point to
the single-platform manifest.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-06-13 14:31:34 +02:00
Sebastiaan van Stijn
5dc1ccdfc8 Merge pull request #50136 from mabrarov/50133-container_stop_state_sync
fix: daemon: state of stopped container visible to other queries when container is stopped
2025-06-13 14:16:37 +02:00
Sebastiaan van Stijn
53d12c96f8 vendor: github.com/containerd/containerd/v2 v2.1.2
no significant changes other than error messages that now contain more
information

full diff: https://github.com/containerd/containerd/compare/v2.1.1...v2.1.2

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-06-13 13:50:48 +02:00
Paweł Gronowski
72145a8ad2 Merge pull request #50146 from vvoland/image-list-containers
api/image/list: Return `Containers` count
2025-06-13 11:34:38 +00:00
Rob Murray
f9e6f25677 Merge pull request #50196 from robmry/fix_TestDaemonRestartRestoreBridgeNetwork
Fix flaky test TestDaemonRestartRestoreBridgeNetwork
2025-06-13 12:21:19 +01:00
Sebastiaan van Stijn
9e985bd96f Merge pull request #50158 from mmorel-35/errorlint
fix errorlint linter
2025-06-13 12:38:38 +02:00
Rob Murray
aac0260d21 Fix flaky test TestDaemonRestartRestoreBridgeNetwork
It checked for "Bind for 0.0.0.0:80 failed: port is already
allocated". But, since commit d662091 ("portallocator: always
check for ports allocated for 0.0.0.0/::"), the message is
sometimes about ":::80".

Signed-off-by: Rob Murray <rob.murray@docker.com>
2025-06-13 10:53:22 +01:00
Paweł Gronowski
cfcbfabb0f api/image/list: Return Containers count
This parameter was already supported for some time in the backend (for
purposes related to docker system prune). It was also already present in
the imagetypes.ListOptions but was never actually handled by the client.

Make it available by default in the response.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-06-13 11:46:09 +02:00
Sebastiaan van Stijn
52a54d9ef6 Merge pull request #50176 from dmcgowan/handle-token-server-error-messages
Handle error message from token server with containerd backend
2025-06-13 10:40:33 +02:00
Matthieu MOREL
6d737371b8 fix comparison rule from errorlint
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>

Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2025-06-13 08:26:56 +00:00
Paweł Gronowski
b65c31427c Merge pull request #50174 from jsternberg/buildkit-update
vendor: github.com/moby/buildkit v0.23.0-rc1
2025-06-12 18:55:04 +00:00
Rob Murray
5de6c1f6f3 Merge pull request #50189 from thaJeztah/fix_TestCopyFromContainerPathIsNotDir
integration-cli: TestCopyFromContainerPathIsNotDir: adjust for win 2025
2025-06-12 19:54:41 +01:00
Sebastiaan van Stijn
84f5e5351c Merge pull request #50145 from vvoland/api-151
api: bump to 1.51
2025-06-12 20:18:50 +02:00
Derek McGowan
941d09e265 Handle error message from token server with containerd backend
Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-06-12 11:13:34 -07:00
Jonathan A. Sternberg
e4e7fcf668 vendor: github.com/moby/buildkit v0.23.0-rc1
Signed-off-by: Jonathan A. Sternberg <jonathan.sternberg@docker.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-06-12 19:08:16 +02:00
Sebastiaan van Stijn
a057f98a30 Merge pull request #50187 from thaJeztah/bump_buildkit_deps
vendor: update buildkit and containerd dependencies
2025-06-12 19:08:04 +02:00
Sebastiaan van Stijn
d3d20b9195 integration-cli: TestCopyFromContainerPathIsNotDir: adjust for win 2025
It looks like the error returned by Windows changed in Windows 2025; before
Windows 2025, this produced a `ERROR_INVALID_NAME`;

    The filename, directory name, or volume label syntax is incorrect.

But Windows 2025 produces a `ERROR_DIRECTORY` ("The directory name is invalid."):

    CreateFile \\\\?\\Volume{d9f06b05-0405-418b-b3e5-4fede64f3cdc}\\windows\\system32\\drivers\\etc\\hosts\\: The directory name is invalid.

Docs; https://learn.microsoft.com/en-us/windows/win32/debug/system-error-codes--0-499-

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-06-12 15:18:17 +02:00
Sebastiaan van Stijn
a3d2e72958 Merge pull request #50183 from thaJeztah/remove_v1_code
daemon/containerd remove leftover schema1 compatibility code
2025-06-12 14:50:38 +02:00
Sebastiaan van Stijn
cf86f3a082 vendor: github.com/containerd/nydus-snapshotter v0.15.2
full diff: https://github.com/containerd/nydus-snapshotter/compare/v0.15.0...v0.15.2

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-06-12 14:07:03 +02:00
Sebastiaan van Stijn
9a85f50aaa vendor: github.com/pelletier/go-toml/v2 v2.2.4
full diff: https://github.com/pelletier/go-toml/compare/v2.2.3...v2.2.4

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-06-12 14:07:03 +02:00
Sebastiaan van Stijn
1764909076 vendor: github.com/fsnotify/fsnotify v1.9.0
full diff: https://github.com/fsnotify/fsnotify/compare/v1.7.0...v1.9.0

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-06-12 14:07:02 +02:00
Sebastiaan van Stijn
102adcab57 vendor: github.com/containerd/console v1.0.5
full diff: https://github.com/containerd/console/compare/v1.0.4...v1.0.5

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-06-12 14:07:02 +02:00
Sebastiaan van Stijn
5230692cad vendor: cloud.google.com/go/longrunning v0.5.5
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-06-12 14:05:28 +02:00
Sebastiaan van Stijn
5fb6604642 vendor: google.golang.org/api v0.160.0
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-06-12 14:03:05 +02:00
Paweł Gronowski
f2faca7de3 Merge pull request #50178 from thaJeztah/pull_clean
daemon/containerd: fix minor linting issue, and update link to error message
2025-06-12 11:49:37 +00:00
Paweł Gronowski
c430c9c7f2 Merge pull request #50115 from corhere/libn/fix-47859-networkdb-clusterleave-leak
libnetwork/networkdb: always shut down memberlist
2025-06-12 11:49:00 +00:00
Sebastiaan van Stijn
d2954c4e05 vendor: otel v1.35.0, otel/contrib v0.60.0, grpc v1.72.2
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-06-12 13:43:25 +02:00
Sebastiaan van Stijn
05f892190c vendor: github.com/prometheus/client_golang v1.22.0
full diff: https://github.com/prometheus/client_golang/compare/v1.20.5...v1.22.0

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-06-12 13:43:24 +02:00
Sebastiaan van Stijn
952cddd05b vendor: google.golang.org/protobuf v1.36.6
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-06-12 13:43:24 +02:00
Sebastiaan van Stijn
ccf5f8036c vendor: golang.org/x/sys v0.33.0
full diff: https:/github.com/golang/sys/compare/v0.32.0...v0.33.0

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-06-12 13:43:24 +02:00
Sebastiaan van Stijn
c81e03bc0b vendor: golang.org/x/sync v0.14.0
full diff: https://github.com/golang/sync/compare/v0.13.0...v0.14.0

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-06-12 13:43:24 +02:00
Paweł Gronowski
b5d26e5883 Merge pull request #50078 from vvoland/cdi-default-cache
daemon: Configure default CDI cache
2025-06-12 11:36:32 +00:00
Sebastiaan van Stijn
05e8b1701c daemon/containerd remove leftover schema1 compatibility code
commit 7c09fa25fd and
e8c269843c removed support for schema1, but
we still enabled the schema1 conversion in containerd, causing the error
produced by dockerd to be shadowed by the error from containerd;

Before this patch, we would get an error from containerd;

    docker pull docker:1.0
    Error response from daemon: failed to get converter for "docker.io/library/docker:1.0": Pulling Schema 1 images have been deprecated and disabled by default since containerd v2.0. As a workaround you may set an environment variable `CONTAINERD_ENABLE_DEPRECATED_PULL_SCHEMA_1_IMAGE=1`, but this will be completely removed in containerd v2.1.

After enabling that env-var, it would return the error from dockerd;

    CONTAINERD_ENABLE_DEPRECATED_PULL_SCHEMA_1_IMAGE=1 dockerd --feature containerd-snapshotter

    docker pull docker:1.0
    Error response from daemon: Docker Image Format v1 and Docker Image manifest version 2, schema 1 support has been removed. Suggest the author of docker.io/library/docker:1.0 to upgrade the image to the OCI Format or Docker Image manifest v2, schema 2. More information at https://docs.docker.com/go/deprecated-image-specs/

With this patch, we immediately return the error from dockerd;

    docker pull docker:1.0
    Error response from daemon: Docker Image Format v1 and Docker Image manifest version 2, schema 1 support has been removed. Suggest the author of docker.io/library/docker:1.0 to upgrade the image to the OCI Format or Docker Image manifest v2, schema 2. More information at https://docs.docker.com/go/deprecated-image-specs/

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-06-12 12:34:26 +02:00
Paweł Gronowski
5bbdb066d8 Merge pull request #50031 from vvoland/bbolt-1.4
vendor: go.etcd.io/bbolt v1.4.0
2025-06-12 10:09:09 +00:00
Sebastiaan van Stijn
2ff281e33a daemon/containerd: update link to containerd code
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-06-12 11:36:08 +02:00
Sebastiaan van Stijn
d54f713d95 daemon/containerd: rename var that shadowed type
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-06-12 11:32:02 +02:00
Marat Abrarov
8e6cd44ce4 daemon: ensuring state of stopped container is visible to other queries when container is stopped and before API response is sent (fix for https://github.com/moby/moby/issues/50133).
Signed-off-by: Marat Abrarov <abrarov@gmail.com>
2025-06-11 18:08:33 +03:00
Sebastiaan van Stijn
3b1d2f746d Merge pull request #49952 from sgopinath1/49824-amd-gpu
Added support for AMD GPUs in "docker run --gpus".
2025-06-11 14:48:58 +02:00
Sebastiaan van Stijn
349a2d0050 Merge pull request #50143 from marie/validate-bind-dir
Validate BIND_DIR variable in Makefile
2025-06-11 14:11:45 +02:00
Rob Murray
7acb079403 Revert "libn/networkdb: don't exceed broadcast size limit"
This reverts commit dacf445614.

Signed-off-by: Rob Murray <rob.murray@docker.com>
2025-06-11 12:05:49 +01:00
Rob Murray
0df31cf585 Revert "libn/networkdb: fix data race in GetTableByNetwork"
This reverts commit ec65f2d21b.

Signed-off-by: Rob Murray <rob.murray@docker.com>
2025-06-11 12:05:48 +01:00
Rob Murray
83b2fc245d Revert "Fix possible overlapping IPs when ingressNA == nil"
This reverts commit 56ad941564.

Signed-off-by: Rob Murray <rob.murray@docker.com>
2025-06-11 12:05:46 +01:00
Rob Murray
e079583ab4 Revert "libnetwork/networkdb: use correct index in GetTableByNetwork"
This reverts commit d5c370dee6.

Signed-off-by: Rob Murray <rob.murray@docker.com>
2025-06-11 12:05:45 +01:00
Rob Murray
cfd5e5e4d4 Revert "libn/networkdb: b'cast watch events from local POV"
This reverts commit c68671d908.

Signed-off-by: Rob Murray <rob.murray@docker.com>
2025-06-11 12:05:44 +01:00
Rob Murray
576cf73add Revert "libn/networkdb: record tombstones for all deletes"
This reverts commit ada8bc3695.

Signed-off-by: Rob Murray <rob.murray@docker.com>
2025-06-11 12:05:43 +01:00
Rob Murray
2297ae3e64 Revert "libn/networkdb: Watch() without race conditions"
This reverts commit a3aea15257.

Signed-off-by: Rob Murray <rob.murray@docker.com>
2025-06-11 12:05:41 +01:00
Rob Murray
cc60ec8d3c Revert "libn/networkdb: stop table events from racing network leaves"
This reverts commit 270a4d41dc.

Signed-off-by: Rob Murray <rob.murray@docker.com>
2025-06-11 12:05:40 +01:00
Rob Murray
b5b349dbd6 Revert "libn/osl: drop unused AddNeighbor force parameter"
This reverts commit 3bdf99d127.

Signed-off-by: Rob Murray <rob.murray@docker.com>
2025-06-11 12:05:39 +01:00
Rob Murray
35916f0869 Revert "libn/osl: refactor func (*Namespace) AddNeighbor"
This reverts commit b6d76eb572.

Signed-off-by: Rob Murray <rob.murray@docker.com>
2025-06-11 12:05:38 +01:00
Rob Murray
3eb59ba5a2 Revert "libnetwork/osl: remove superfluous locks in Namespace"
This reverts commit 9866738736.

Signed-off-by: Rob Murray <rob.murray@docker.com>
2025-06-11 12:05:37 +01:00
Rob Murray
5d6ae34753 Revert "libnetwork/osl: stop tracking neighbor entries"
This reverts commit 0d6e7cd983.

Signed-off-by: Rob Murray <rob.murray@docker.com>
2025-06-11 12:05:36 +01:00
Rob Murray
ea818a7f6f Revert "libnetwork/internal/setmatrix: make keys generic"
This reverts commit 0317f773a6.

Signed-off-by: Rob Murray <rob.murray@docker.com>
2025-06-11 12:05:33 +01:00
Rob Murray
78ccc20545 Revert "libn/d/overlay: use netip types more"
This reverts commit d188df0039.

Signed-off-by: Rob Murray <rob.murray@docker.com>
2025-06-11 12:05:26 +01:00
Paweł Gronowski
86091394e9 Merge pull request #50164 from thaJeztah/fix_linting_nits
fix some linting issues
2025-06-11 10:46:15 +00:00
Rob Murray
6b9bd0a800 Merge pull request #50144 from thaJeztah/rm_import_aliases
all: remove redundant import-aliases for "go-winio"
2025-06-11 11:25:05 +01:00
Paweł Gronowski
d371ea117b Merge pull request #50156 from gagara/openrc-containerd-customization
openrc: allow customizing containerd service name
2025-06-11 09:24:11 +00:00
Paweł Gronowski
e84353ebbd Merge pull request #50135 from thaJeztah/inspect_no_omitempty
api: image inspect: add back fields that did not omitempty
2025-06-11 08:58:14 +00:00
Sebastiaan van Stijn
23c56099ee daemon/logger/loggerutils: use defer to fix gocritic "badlock" linter
daemon/logger/loggerutils/logfile.go:374:2: badLock: defer is missing, mutex is unlocked immediately (gocritic)
        w.rotateMu.Unlock()
        ^

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-06-10 13:54:56 +02:00
Sebastiaan van Stijn
0069360e3b volume/mounts: windowsDetectMountType: rewrite using switch
Mostly for readability, and to avoid linters suggesting to move the
default condition outside of the if/else.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-06-10 13:19:25 +02:00
Sebastiaan van Stijn
027355d7b3 container/stream: TestRaceUnbuffered: put unused testing.T to use
Some linters were complaining about the testing.T not being used; put
it to use to silence the linter.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-06-10 13:15:05 +02:00
Sebastiaan van Stijn
2bbf5f5a39 daemon/containerd: ImageService.resolveImage: cleanup resolve by name:tag
- scope variables locally to the if/else if
- use if/else if to try to make it more clear it's a "best effort" before
  falling through to other ways of resolving the image reference
- remove outdated TODO, now that containerd errdefs can be used for either
  moby, or containerd error definitions.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-06-10 13:13:44 +02:00
Sebastiaan van Stijn
13879e7b49 Merge pull request #50082 from mmorel-35/go-critic
fix go-critic linter
2025-06-10 13:09:05 +02:00
Paweł Gronowski
729cbbd5c0 Merge pull request #49950 from dmcgowan/contributing-package-location
Add contributor guidelines for where to put source code in packages
2025-06-10 10:56:43 +00:00
Paweł Gronowski
52a8109a6b Merge pull request #50155 from robmry/windows_no_mirrored_plugin
Windows: don't try to load "mirrored" network plugin
2025-06-10 09:36:22 +00:00
Tianon Gravi
b2d4925e4a Merge pull request #50154 from robmry/dont_prune_windows_host_networks
Only "prune" Windows networks created by Docker
2025-06-09 15:28:51 -07:00
Paweł Gronowski
2e25775c83 libnetwork: Replace deprecated usages
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-06-09 19:30:00 +02:00
Paweł Gronowski
3dd8f03f25 vendor: go.etcd.io/bbolt v1.4.0
full diff: https://github.com/etcd-io/bbolt/compare/v1.3.11...v1.4.0

Changelog: https://github.com/etcd-io/bbolt/blob/main/CHANGELOG/CHANGELOG-1.4.md

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-06-09 19:29:58 +02:00
Rob Murray
55f47f9e34 Windows: don't try to load "mirrored" network plugin
Signed-off-by: Rob Murray <rob.murray@docker.com>
2025-06-09 11:38:13 +01:00
Matthieu MOREL
20b6075380 fix badCall from go-critic
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2025-06-08 09:02:11 +02:00
Viacheslav Gagara
10c4715a62 openrc: allow customizing containerd service name
Signed-off-by: Viacheslav Gagara <viacheslavg@gmail.com>
2025-06-08 09:10:59 +03:00
Matthieu MOREL
c466ae0f71 fix badLock from go-critic
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2025-06-07 09:57:59 +02:00
Matthieu MOREL
19f5ac3c81 fix initClause from go-critic
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2025-06-07 09:57:59 +02:00
Matthieu MOREL
aa632664b6 fix mapKey from go-critic
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2025-06-07 09:57:59 +02:00
Matthieu MOREL
5ad4e4edf7 fix deprecatedComment from go-critic
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2025-06-07 09:57:59 +02:00
Matthieu MOREL
b8a4f6534f fix stringsCompare and stringConcatSimplify from go-critic
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2025-06-07 09:57:59 +02:00
Matthieu MOREL
a62de57aa1 fix sprintfQuotedString from go-critic
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2025-06-07 09:57:59 +02:00
Matthieu MOREL
bc9ec5fc02 fix emptyStringTest from go-critic
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2025-06-07 09:57:59 +02:00
Matthieu MOREL
469afa5f8f fix httpNoBody from go-critic
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2025-06-07 09:57:58 +02:00
Matthieu MOREL
8f7faa01d1 fix boolExprSimplify from go-critic
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2025-06-07 09:57:58 +02:00
Matthieu MOREL
e5be7b54b1 fix yodaStyleExpr from go-critic
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2025-06-07 09:57:58 +02:00
Matthieu MOREL
64075850fc fix go-critic linter
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2025-06-07 09:57:58 +02:00
Sebastiaan van Stijn
145834f278 Merge pull request #50153 from vvoland/update-go
update to go1.24.4
2025-06-07 07:37:53 +02:00
Rob Murray
793dd8385a Only "prune" Windows networks created by Docker
Signed-off-by: Rob Murray <rob.murray@docker.com>
2025-06-06 20:24:04 +01:00
Derek McGowan
071d27cd3d Add contributor guidelines for where to put source code in packages
Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-06-06 11:31:04 -07:00
Paweł Gronowski
1603ad636e update to go1.24.4
- https://github.com/golang/go/issues?q=milestone%3AGo1.24.4+label%3ACherryPickApproved
- full diff: https://github.com/golang/go/compare/go1.24.3...go1.24.4

This release includes 3 security fixes following the security policy:

- net/http: sensitive headers not cleared on cross-origin redirect

    Proxy-Authorization and Proxy-Authenticate headers persisted on cross-origin redirects potentially leaking sensitive information.

    Thanks to Takeshi Kaneko (GMO Cybersecurity by Ierae, Inc.) for reporting this issue.

    This is CVE-2025-4673 and Go issue https://go.dev/issue/73816.

- os: inconsistent handling of O_CREATE|O_EXCL on Unix and Windows

    os.OpenFile(path, os.O_CREATE|O_EXCL) behaved differently on Unix and Windows systems when the target path was a dangling symlink. On Unix systems, OpenFile with O_CREATE and O_EXCL flags never follows symlinks. On Windows, when the target path was a symlink to a nonexistent location, OpenFile would create a file in that location.

    OpenFile now always returns an error when the O_CREATE and O_EXCL flags are both set and the target path is a symlink.

    Thanks to Junyoung Park and Dong-uk Kim of KAIST Hacking Lab for discovering this issue.

    This is CVE-2025-0913 and Go issue https://go.dev/issue/73702.

- crypto/x509: usage of ExtKeyUsageAny disables policy validation

    Calling Verify with a VerifyOptions.KeyUsages that contains ExtKeyUsageAny unintentionally disabledpolicy validation. This only affected certificate chains which contain policy graphs, which are rather uncommon.

    Thanks to Krzysztof Skrzętnicki (@Tener) of Teleport for reporting this issue.

    This is CVE-2025-22874 and Go issue https://go.dev/issue/73612.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-06-06 19:35:32 +02:00
Sebastiaan van Stijn
2da78d4fcc Merge pull request #50022 from mmorel-35/thelper
fix thelper linter
2025-06-06 09:53:29 +02:00
Matthieu MOREL
9b5d8cd186 fix thelper linter
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2025-06-05 21:42:05 +00:00
Maria Glushenok
ea581c96b9 Validate BIND_DIR variable in Makefile
Signed-off-by: Maria Glushenok <glushenokm@gmail.com>
2025-06-05 20:43:41 +03:00
Sebastiaan van Stijn
59bdc72463 Merge pull request #50147 from robmry/inspect_overlay_enableipv4
Set EnableIPv4=true in overlay network inspect response
2025-06-05 19:08:48 +02:00
Sudheendra Gopinath
e32715ec03 Added support for AMD GPUs in "docker run --gpus".
Added backend code to support the exact same interface
used today for Nvidia GPUs, allowing customers to use
the same docker commands for both Nvidia and AMD GPUs.

Signed-off-by: Sudheendra Gopinath <sudheendra.gopinath@amd.com>

Reused common functions from nvidia_linux.go.

Removed duplicate code in amd_linux.go by reusing
the init() and countToDevices() functions in
nvidia_linux.go. AMD driver is registered in init().

Signed-off-by: Sudheendra Gopinath <sudheendra.gopinath@amd.com>

Renamed amd-container-runtime constant

Signed-off-by: Sudheendra Gopinath <sudheendra.gopinath@amd.com>

Removed empty branch to keep linter happy.

Also renamed amd_linux.go to gpu_amd_linux.go.

Signed-off-by: Sudheendra Gopinath <sudheendra.gopinath@amd.com>

Renamed nvidia_linux.go and gpu_amd_linux.go.

Signed-off-by: Sudheendra Gopinath <sudheendra.gopinath@amd.com>
2025-06-05 14:44:18 +00:00
Rob Murray
6bac5ca833 Set EnableIPv4=true in overlay network inspect response
Signed-off-by: Rob Murray <rob.murray@docker.com>
2025-06-05 15:27:32 +01:00
Paweł Gronowski
27f2e0ecc5 api: bump to 1.51
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-06-05 12:32:48 +02:00
Sebastiaan van Stijn
bd20bfdc41 all: remove redundant import-aliases for "go-winio"
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-06-05 12:11:30 +02:00
Sebastiaan van Stijn
acac1d84ce Merge pull request #50127 from thaJeztah/swagger_uint
api/swagger: quote maxUint64 example value
2025-06-05 11:59:20 +02:00
Akihiro Suda
c29de525b8 Merge pull request #50087 from vvoland/vendor-miekgdns
vendor: github.com/miekg/dns v1.1.66
2025-06-05 15:24:33 +09:00
Sebastiaan van Stijn
f85394dd5d api: image inspect: add back fields that did not omitempty
commit 4dc961d0e9 removed deprecated
fields from the image inspect response for API v1.50 and up. As
part of that change, it changed the type used for the Config field
to use the docker image spect structs, which embeds the OCI image
spec structs.

While the OCI image spect struct contains the same fields as we
used before, those fields also have "omitempty" set, which means
they are now omitted when empty.

We should probably consider deprecating that behavior in the API,
and call out that these fields are omitted if not set, but in the
meantime, we can add them back with their default (zero) value.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-06-04 18:01:19 +02:00
Rob Murray
9663b36b6d Merge pull request #50054 from robmry/fix_port_mapping
Avoid selecting duplicate host ports for mappings to 0.0.0.0 and specific addresses
2025-06-04 16:46:29 +01:00
Sebastiaan van Stijn
ee69d8ac95 Merge pull request #50051 from robmry/nftables_no_docker_user
nftables: don't create DOCKER-USER iptables chains
2025-06-03 13:19:12 +02:00
Sebastiaan van Stijn
e2b9f3d844 Merge pull request #50059 from shangmu/master
dockerd-rootless-setuptool.sh: Fix silent stop on error due to using output redirection together wit…
2025-06-03 12:05:03 +02:00
Paweł Gronowski
a8d3645957 Merge pull request #50128 from thaJeztah/bump_cli
Dockerfile: update cli to v28.2.2
2025-06-02 14:14:39 +00:00
Sebastiaan van Stijn
a9fabe7f0e Merge pull request #50124 from thaJeztah/resolvconf_table_test
libnetwork/resolvconf: Build: decorate error for invalid nameservers and use table-tests
2025-06-02 15:51:41 +02:00
Sebastiaan van Stijn
284904119a Dockerfile: update cli to v28.2.2
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-06-02 14:54:44 +02:00
Sebastiaan van Stijn
8ba832cc8f docs/api: swagger: quote maxUint64 example value
More recent versions of go-swagger failed on this, because the value
is interpolated as JSON numberic value, which assumes int64 (signed).

Quote the value to prevent it being handled before validated against
uint64.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-06-02 14:47:48 +02:00
Sebastiaan van Stijn
affe1d6335 api/swagger: quote maxUint64 example value
More recent versions of go-swagger failed on this, because the value
is interpolated as JSON numberic value, which assumes int64 (signed).

Quote the value to prevent it being handled before validated against
uint64.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-06-02 14:45:11 +02:00
Sebastiaan van Stijn
b6fa565cba libnetwork/resolvconf: Build: decorate error for invalid nameservers
Using the same prefix as is used in `Sandbox.loadResolvConf`, but omiting
the value, as it's already part of the error message;
829b695375/libnetwork/sandbox_dns_unix.go (L258-L261)

Unfortunately, `netip.ParseAddr` returns a non-exported (`parseAddrError`)
error-type; https://cs.opensource.google/go/go/+/refs/tags/go1.24.3:src/net/netip/netip.go;l=115

So we don't have the option to omit the `` from the error-message, and to
take the underlying `msg` field;
https://cs.opensource.google/go/go/+/refs/tags/go1.24.3:src/net/netip/netip.go;l=141-153

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-06-02 12:33:28 +02:00
Sebastiaan van Stijn
35e062dde1 libnetwork/resolvconf: rewrite TestBuild tests to a table-test
Also adding test-cases for;

- empty options for all fields
- invalid nameServer (domain instead of IP).

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-06-02 12:20:19 +02:00
Akihiro Suda
829b695375 Merge pull request #50109 from vvoland/binimage-nosha
gha/bin-image: Don't push sha tags
2025-05-31 15:52:08 +09:00
Sebastiaan van Stijn
9649dc8134 Merge pull request #50110 from thaJeztah/remove_import_comments
all: remove // import comments
2025-05-30 20:35:54 +02:00
Cory Snider
16ed51d864 libnetwork/networkdb: always shut down memberlist
Gracefully leaving the memberlist cluster is a best-effort operation.
Failing to successfully broadcast the leave message to a peer should not
prevent NetworkDB from cleaning up the memberlist instance on close. But
that was not the case in practice. Log the error returned from
(*memberlist.Memberlist).Leave instead of returning it and proceed with
shutting down irrespective of whether Leave() returns an error.

Signed-off-by: Cory Snider <csnider@mirantis.com>
2025-05-30 13:56:47 -04:00
Sebastiaan van Stijn
c1a27ea5af pkg/stack: remove // import comments
These comments were added to enforce using the correct import path for
our packages ("github.com/docker/docker", not "github.com/moby/moby").
However, when working in go module mode (not GOPATH / vendor), they have
no effect, so their impact is limited.

Remove these imports in preparation of migrating our code to become an
actual go module.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-05-30 15:59:22 +02:00
Sebastiaan van Stijn
dd382769bd pkg/rootless: remove // import comments
These comments were added to enforce using the correct import path for
our packages ("github.com/docker/docker", not "github.com/moby/moby").
However, when working in go module mode (not GOPATH / vendor), they have
no effect, so their impact is limited.

Remove these imports in preparation of migrating our code to become an
actual go module.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-05-30 15:59:22 +02:00
Sebastiaan van Stijn
ce191648c7 pkg/useragent: remove // import comments
These comments were added to enforce using the correct import path for
our packages ("github.com/docker/docker", not "github.com/moby/moby").
However, when working in go module mode (not GOPATH / vendor), they have
no effect, so their impact is limited.

Remove these imports in preparation of migrating our code to become an
actual go module.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-05-30 15:59:21 +02:00
Sebastiaan van Stijn
ad1a388895 pkg/tailfile: remove // import comments
These comments were added to enforce using the correct import path for
our packages ("github.com/docker/docker", not "github.com/moby/moby").
However, when working in go module mode (not GOPATH / vendor), they have
no effect, so their impact is limited.

Remove these imports in preparation of migrating our code to become an
actual go module.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-05-30 15:59:21 +02:00
Sebastiaan van Stijn
b6f99f6d7f pkg/stringid: remove // import comments
These comments were added to enforce using the correct import path for
our packages ("github.com/docker/docker", not "github.com/moby/moby").
However, when working in go module mode (not GOPATH / vendor), they have
no effect, so their impact is limited.

Remove these imports in preparation of migrating our code to become an
actual go module.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-05-30 15:59:21 +02:00
Sebastiaan van Stijn
ca2cca1286 pkg/stdcopy: remove // import comments
These comments were added to enforce using the correct import path for
our packages ("github.com/docker/docker", not "github.com/moby/moby").
However, when working in go module mode (not GOPATH / vendor), they have
no effect, so their impact is limited.

Remove these imports in preparation of migrating our code to become an
actual go module.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-05-30 15:59:21 +02:00
Sebastiaan van Stijn
225b7ca6b7 pkg/progress: remove // import comments
These comments were added to enforce using the correct import path for
our packages ("github.com/docker/docker", not "github.com/moby/moby").
However, when working in go module mode (not GOPATH / vendor), they have
no effect, so their impact is limited.

Remove these imports in preparation of migrating our code to become an
actual go module.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-05-30 15:59:21 +02:00
Sebastiaan van Stijn
0f9818ad03 pkg/pools: remove // import comments
These comments were added to enforce using the correct import path for
our packages ("github.com/docker/docker", not "github.com/moby/moby").
However, when working in go module mode (not GOPATH / vendor), they have
no effect, so their impact is limited.

Remove these imports in preparation of migrating our code to become an
actual go module.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-05-30 15:59:20 +02:00
Sebastiaan van Stijn
f0f4fa0038 pkg/plugingetter: remove // import comments
These comments were added to enforce using the correct import path for
our packages ("github.com/docker/docker", not "github.com/moby/moby").
However, when working in go module mode (not GOPATH / vendor), they have
no effect, so their impact is limited.

Remove these imports in preparation of migrating our code to become an
actual go module.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-05-30 15:59:20 +02:00
Sebastiaan van Stijn
5f4da92972 pkg/platform: remove // import comments
These comments were added to enforce using the correct import path for
our packages ("github.com/docker/docker", not "github.com/moby/moby").
However, when working in go module mode (not GOPATH / vendor), they have
no effect, so their impact is limited.

Remove these imports in preparation of migrating our code to become an
actual go module.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-05-30 15:59:20 +02:00
Sebastiaan van Stijn
7a703f3772 pkg/pidfile: remove // import comments
These comments were added to enforce using the correct import path for
our packages ("github.com/docker/docker", not "github.com/moby/moby").
However, when working in go module mode (not GOPATH / vendor), they have
no effect, so their impact is limited.

Remove these imports in preparation of migrating our code to become an
actual go module.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-05-30 15:59:20 +02:00
Sebastiaan van Stijn
511cf09e75 pkg/namesgenerator: remove // import comments
These comments were added to enforce using the correct import path for
our packages ("github.com/docker/docker", not "github.com/moby/moby").
However, when working in go module mode (not GOPATH / vendor), they have
no effect, so their impact is limited.

Remove these imports in preparation of migrating our code to become an
actual go module.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-05-30 15:59:19 +02:00
Sebastiaan van Stijn
864e3f9348 pkg/longpath: remove // import comments
These comments were added to enforce using the correct import path for
our packages ("github.com/docker/docker", not "github.com/moby/moby").
However, when working in go module mode (not GOPATH / vendor), they have
no effect, so their impact is limited.

Remove these imports in preparation of migrating our code to become an
actual go module.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-05-30 15:59:19 +02:00
Sebastiaan van Stijn
cc329af619 pkg/jsonmessage: remove // import comments
These comments were added to enforce using the correct import path for
our packages ("github.com/docker/docker", not "github.com/moby/moby").
However, when working in go module mode (not GOPATH / vendor), they have
no effect, so their impact is limited.

Remove these imports in preparation of migrating our code to become an
actual go module.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-05-30 15:59:19 +02:00
Sebastiaan van Stijn
0c70c762b2 pkg/streamformatter: remove // import comments
These comments were added to enforce using the correct import path for
our packages ("github.com/docker/docker", not "github.com/moby/moby").
However, when working in go module mode (not GOPATH / vendor), they have
no effect, so their impact is limited.

Remove these imports in preparation of migrating our code to become an
actual go module.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-05-30 15:59:19 +02:00
Sebastiaan van Stijn
fd8b6a24ab pkg/tarsum: remove // import comments
These comments were added to enforce using the correct import path for
our packages ("github.com/docker/docker", not "github.com/moby/moby").
However, when working in go module mode (not GOPATH / vendor), they have
no effect, so their impact is limited.

Remove these imports in preparation of migrating our code to become an
actual go module.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-05-30 15:59:19 +02:00
Sebastiaan van Stijn
17845556f2 pkg/system: remove // import comments
These comments were added to enforce using the correct import path for
our packages ("github.com/docker/docker", not "github.com/moby/moby").
However, when working in go module mode (not GOPATH / vendor), they have
no effect, so their impact is limited.

Remove these imports in preparation of migrating our code to become an
actual go module.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-05-30 15:59:19 +02:00
Sebastiaan van Stijn
18a1b61b49 pkg/sysinfo: remove // import comments
These comments were added to enforce using the correct import path for
our packages ("github.com/docker/docker", not "github.com/moby/moby").
However, when working in go module mode (not GOPATH / vendor), they have
no effect, so their impact is limited.

Remove these imports in preparation of migrating our code to become an
actual go module.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-05-30 15:59:18 +02:00
Sebastiaan van Stijn
126246ae39 pkg/plugins: remove // import comments
These comments were added to enforce using the correct import path for
our packages ("github.com/docker/docker", not "github.com/moby/moby").
However, when working in go module mode (not GOPATH / vendor), they have
no effect, so their impact is limited.

Remove these imports in preparation of migrating our code to become an
actual go module.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-05-30 15:59:18 +02:00
Sebastiaan van Stijn
0380c952a6 pkg/parsers: remove // import comments
These comments were added to enforce using the correct import path for
our packages ("github.com/docker/docker", not "github.com/moby/moby").
However, when working in go module mode (not GOPATH / vendor), they have
no effect, so their impact is limited.

Remove these imports in preparation of migrating our code to become an
actual go module.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-05-30 15:59:18 +02:00
Sebastiaan van Stijn
4800a9b50d pkg/ioutils: remove // import comments
These comments were added to enforce using the correct import path for
our packages ("github.com/docker/docker", not "github.com/moby/moby").
However, when working in go module mode (not GOPATH / vendor), they have
no effect, so their impact is limited.

Remove these imports in preparation of migrating our code to become an
actual go module.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-05-30 15:59:18 +02:00
Sebastiaan van Stijn
ca3982adea pkg/homedir: remove // import comments
These comments were added to enforce using the correct import path for
our packages ("github.com/docker/docker", not "github.com/moby/moby").
However, when working in go module mode (not GOPATH / vendor), they have
no effect, so their impact is limited.

Remove these imports in preparation of migrating our code to become an
actual go module.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-05-30 15:59:17 +02:00
Sebastiaan van Stijn
c93f18e0b8 pkg/fileutils: remove // import comments
These comments were added to enforce using the correct import path for
our packages ("github.com/docker/docker", not "github.com/moby/moby").
However, when working in go module mode (not GOPATH / vendor), they have
no effect, so their impact is limited.

Remove these imports in preparation of migrating our code to become an
actual go module.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-05-30 15:59:17 +02:00
Sebastiaan van Stijn
6a9f7c543c pkg/authorization: remove // import comments
These comments were added to enforce using the correct import path for
our packages ("github.com/docker/docker", not "github.com/moby/moby").
However, when working in go module mode (not GOPATH / vendor), they have
no effect, so their impact is limited.

Remove these imports in preparation of migrating our code to become an
actual go module.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-05-30 15:59:17 +02:00
Sebastiaan van Stijn
a4411f497f errdefs: remove // import comments
These comments were added to enforce using the correct import path for
our packages ("github.com/docker/docker", not "github.com/moby/moby").
However, when working in go module mode (not GOPATH / vendor), they have
no effect, so their impact is limited.

Remove these imports in preparation of migrating our code to become an
actual go module.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-05-30 15:59:17 +02:00
Sebastiaan van Stijn
0ea03c4add opts: remove // import comments
These comments were added to enforce using the correct import path for
our packages ("github.com/docker/docker", not "github.com/moby/moby").
However, when working in go module mode (not GOPATH / vendor), they have
no effect, so their impact is limited.

Remove these imports in preparation of migrating our code to become an
actual go module.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-05-30 15:59:16 +02:00
Sebastiaan van Stijn
7ce4e9685a oci: remove // import comments
These comments were added to enforce using the correct import path for
our packages ("github.com/docker/docker", not "github.com/moby/moby").
However, when working in go module mode (not GOPATH / vendor), they have
no effect, so their impact is limited.

Remove these imports in preparation of migrating our code to become an
actual go module.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-05-30 15:59:16 +02:00
Sebastiaan van Stijn
23009a700a testutil: remove // import comments
These comments were added to enforce using the correct import path for
our packages ("github.com/docker/docker", not "github.com/moby/moby").
However, when working in go module mode (not GOPATH / vendor), they have
no effect, so their impact is limited.

Remove these imports in preparation of migrating our code to become an
actual go module.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-05-30 15:59:16 +02:00
Sebastiaan van Stijn
fe1bc3e7fd runconfig: remove // import comments
These comments were added to enforce using the correct import path for
our packages ("github.com/docker/docker", not "github.com/moby/moby").
However, when working in go module mode (not GOPATH / vendor), they have
no effect, so their impact is limited.

Remove these imports in preparation of migrating our code to become an
actual go module.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-05-30 15:59:16 +02:00
Sebastiaan van Stijn
4656712b82 restartmanager: remove // import comments
These comments were added to enforce using the correct import path for
our packages ("github.com/docker/docker", not "github.com/moby/moby").
However, when working in go module mode (not GOPATH / vendor), they have
no effect, so their impact is limited.

Remove these imports in preparation of migrating our code to become an
actual go module.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-05-30 15:59:15 +02:00
Sebastiaan van Stijn
134f20c828 reference: remove // import comments
These comments were added to enforce using the correct import path for
our packages ("github.com/docker/docker", not "github.com/moby/moby").
However, when working in go module mode (not GOPATH / vendor), they have
no effect, so their impact is limited.

Remove these imports in preparation of migrating our code to become an
actual go module.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-05-30 15:59:15 +02:00
Sebastiaan van Stijn
97b20f6b79 registry: remove // import comments
These comments were added to enforce using the correct import path for
our packages ("github.com/docker/docker", not "github.com/moby/moby").
However, when working in go module mode (not GOPATH / vendor), they have
no effect, so their impact is limited.

Remove these imports in preparation of migrating our code to become an
actual go module.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-05-30 15:59:15 +02:00
Sebastiaan van Stijn
2548254317 quota: remove // import comments
These comments were added to enforce using the correct import path for
our packages ("github.com/docker/docker", not "github.com/moby/moby").
However, when working in go module mode (not GOPATH / vendor), they have
no effect, so their impact is limited.

Remove these imports in preparation of migrating our code to become an
actual go module.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-05-30 15:59:15 +02:00
Sebastiaan van Stijn
66055ea07c plugin: remove // import comments
These comments were added to enforce using the correct import path for
our packages ("github.com/docker/docker", not "github.com/moby/moby").
However, when working in go module mode (not GOPATH / vendor), they have
no effect, so their impact is limited.

Remove these imports in preparation of migrating our code to become an
actual go module.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-05-30 15:59:15 +02:00
Sebastiaan van Stijn
3bbb38f1d2 volume: remove // import comments
These comments were added to enforce using the correct import path for
our packages ("github.com/docker/docker", not "github.com/moby/moby").
However, when working in go module mode (not GOPATH / vendor), they have
no effect, so their impact is limited.

Remove these imports in preparation of migrating our code to become an
actual go module.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-05-30 15:59:14 +02:00
Sebastiaan van Stijn
021dd75bc4 libcontainerd: remove // import comments
These comments were added to enforce using the correct import path for
our packages ("github.com/docker/docker", not "github.com/moby/moby").
However, when working in go module mode (not GOPATH / vendor), they have
no effect, so their impact is limited.

Remove these imports in preparation of migrating our code to become an
actual go module.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-05-30 15:59:14 +02:00
Sebastiaan van Stijn
fe34e89992 layer: remove // import comments
These comments were added to enforce using the correct import path for
our packages ("github.com/docker/docker", not "github.com/moby/moby").
However, when working in go module mode (not GOPATH / vendor), they have
no effect, so their impact is limited.

Remove these imports in preparation of migrating our code to become an
actual go module.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-05-30 15:59:14 +02:00
Sebastiaan van Stijn
9abf9f2d0d internal: remove // import comments
These comments were added to enforce using the correct import path for
our packages ("github.com/docker/docker", not "github.com/moby/moby").
However, when working in go module mode (not GOPATH / vendor), they have
no effect, so their impact is limited.

Remove these imports in preparation of migrating our code to become an
actual go module.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-05-30 15:59:14 +02:00
Sebastiaan van Stijn
4970333621 integration: remove // import comments
These comments were added to enforce using the correct import path for
our packages ("github.com/docker/docker", not "github.com/moby/moby").
However, when working in go module mode (not GOPATH / vendor), they have
no effect, so their impact is limited.

Remove these imports in preparation of migrating our code to become an
actual go module.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-05-30 15:59:14 +02:00
Sebastiaan van Stijn
a4b0d32fa6 integration-cli: remove // import comments
These comments were added to enforce using the correct import path for
our packages ("github.com/docker/docker", not "github.com/moby/moby").
However, when working in go module mode (not GOPATH / vendor), they have
no effect, so their impact is limited.

Remove these imports in preparation of migrating our code to become an
actual go module.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-05-30 15:59:13 +02:00
Sebastiaan van Stijn
7eecd04c7b image: remove // import comments
These comments were added to enforce using the correct import path for
our packages ("github.com/docker/docker", not "github.com/moby/moby").
However, when working in go module mode (not GOPATH / vendor), they have
no effect, so their impact is limited.

Remove these imports in preparation of migrating our code to become an
actual go module.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-05-30 15:59:13 +02:00
Sebastiaan van Stijn
c1a3c51d9e dockerversion: remove // import comments
These comments were added to enforce using the correct import path for
our packages ("github.com/docker/docker", not "github.com/moby/moby").
However, when working in go module mode (not GOPATH / vendor), they have
no effect, so their impact is limited.

Remove these imports in preparation of migrating our code to become an
actual go module.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-05-30 15:59:13 +02:00
Sebastiaan van Stijn
c7cb2d9783 distribution: remove // import comments
These comments were added to enforce using the correct import path for
our packages ("github.com/docker/docker", not "github.com/moby/moby").
However, when working in go module mode (not GOPATH / vendor), they have
no effect, so their impact is limited.

Remove these imports in preparation of migrating our code to become an
actual go module.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-05-30 15:59:13 +02:00
Sebastiaan van Stijn
5318877858 daemon: remove // import comments
These comments were added to enforce using the correct import path for
our packages ("github.com/docker/docker", not "github.com/moby/moby").
However, when working in go module mode (not GOPATH / vendor), they have
no effect, so their impact is limited.

Remove these imports in preparation of migrating our code to become an
actual go module.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-05-30 15:59:13 +02:00
Sebastiaan van Stijn
076e98e8f3 daemon/links, daemon/network: remove // import comments
These comments were added to enforce using the correct import path for
our packages ("github.com/docker/docker", not "github.com/moby/moby").
However, when working in go module mode (not GOPATH / vendor), they have
no effect, so their impact is limited.

Remove these imports in preparation of migrating our code to become an
actual go module.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-05-30 15:59:12 +02:00
Sebastiaan van Stijn
2b42088bd5 daemon/listeners: remove // import comments
These comments were added to enforce using the correct import path for
our packages ("github.com/docker/docker", not "github.com/moby/moby").
However, when working in go module mode (not GOPATH / vendor), they have
no effect, so their impact is limited.

Remove these imports in preparation of migrating our code to become an
actual go module.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-05-30 15:59:12 +02:00
Sebastiaan van Stijn
241e0bca8b daemon/events: remove // import comments
These comments were added to enforce using the correct import path for
our packages ("github.com/docker/docker", not "github.com/moby/moby").
However, when working in go module mode (not GOPATH / vendor), they have
no effect, so their impact is limited.

Remove these imports in preparation of migrating our code to become an
actual go module.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-05-30 15:59:12 +02:00
Sebastiaan van Stijn
27956106d5 daemon/config: remove // import comments
These comments were added to enforce using the correct import path for
our packages ("github.com/docker/docker", not "github.com/moby/moby").
However, when working in go module mode (not GOPATH / vendor), they have
no effect, so their impact is limited.

Remove these imports in preparation of migrating our code to become an
actual go module.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-05-30 15:59:12 +02:00
Sebastiaan van Stijn
69c34390c0 daemon/logger: remove // import comments
These comments were added to enforce using the correct import path for
our packages ("github.com/docker/docker", not "github.com/moby/moby").
However, when working in go module mode (not GOPATH / vendor), they have
no effect, so their impact is limited.

Remove these imports in preparation of migrating our code to become an
actual go module.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-05-30 15:59:12 +02:00
Sebastiaan van Stijn
7d4caf4ba8 daemon/images: remove // import comments
These comments were added to enforce using the correct import path for
our packages ("github.com/docker/docker", not "github.com/moby/moby").
However, when working in go module mode (not GOPATH / vendor), they have
no effect, so their impact is limited.

Remove these imports in preparation of migrating our code to become an
actual go module.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-05-30 15:59:12 +02:00
Sebastiaan van Stijn
9876c9fbcf daemon/graphdriver: remove // import comments
These comments were added to enforce using the correct import path for
our packages ("github.com/docker/docker", not "github.com/moby/moby").
However, when working in go module mode (not GOPATH / vendor), they have
no effect, so their impact is limited.

Remove these imports in preparation of migrating our code to become an
actual go module.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-05-30 15:59:11 +02:00
Sebastiaan van Stijn
986ec3f877 daemon/cluster: remove // import comments
These comments were added to enforce using the correct import path for
our packages ("github.com/docker/docker", not "github.com/moby/moby").
However, when working in go module mode (not GOPATH / vendor), they have
no effect, so their impact is limited.

Remove these imports in preparation of migrating our code to become an
actual go module.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-05-30 15:59:11 +02:00
Sebastiaan van Stijn
89aa33001e container: remove // import comments
These comments were added to enforce using the correct import path for
our packages ("github.com/docker/docker", not "github.com/moby/moby").
However, when working in go module mode (not GOPATH / vendor), they have
no effect, so their impact is limited.

Remove these imports in preparation of migrating our code to become an
actual go module.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-05-30 15:59:11 +02:00
Sebastiaan van Stijn
d469079338 cmd: remove // import comments
These comments were added to enforce using the correct import path for
our packages ("github.com/docker/docker", not "github.com/moby/moby").
However, when working in go module mode (not GOPATH / vendor), they have
no effect, so their impact is limited.

Remove these imports in preparation of migrating our code to become an
actual go module.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-05-30 15:59:11 +02:00
Sebastiaan van Stijn
c6bbc3bb6e builder: remove // import comments
These comments were added to enforce using the correct import path for
our packages ("github.com/docker/docker", not "github.com/moby/moby").
However, when working in go module mode (not GOPATH / vendor), they have
no effect, so their impact is limited.

Remove these imports in preparation of migrating our code to become an
actual go module.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-05-30 15:59:11 +02:00
Sebastiaan van Stijn
4856e8ffad client: remove // import comments
These comments were added to enforce using the correct import path for
our packages ("github.com/docker/docker", not "github.com/moby/moby").
However, when working in go module mode (not GOPATH / vendor), they have
no effect, so their impact is limited.

Remove these imports in preparation of migrating our code to become an
actual go module.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-05-30 15:59:10 +02:00
Sebastiaan van Stijn
bf9d739561 api: remove // import comments
These comments were added to enforce using the correct import path for
our packages ("github.com/docker/docker", not "github.com/moby/moby").
However, when working in go module mode (not GOPATH / vendor), they have
no effect, so their impact is limited.

Remove these imports in preparation of migrating our code to become an
actual go module.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-05-30 15:59:01 +02:00
Sebastiaan van Stijn
cee6f64ac7 Merge pull request #50112 from thaJeztah/libnet_overlayutils_overflow
libnet/d/overlay/overlayutils: prevent uint32 overflow
2025-05-30 15:56:00 +02:00
Sebastiaan van Stijn
f1f9950e4a Merge pull request #50111 from thaJeztah/fluentd_overflow
daemon/logger/fluentd: cap max-retries to MaxInt32
2025-05-30 15:55:32 +02:00
Sebastiaan van Stijn
fca97dae9d libnet/d/overlay/overlayutils: prevent uint32 overflow
CodeQL was complaining about the conversion to uint32

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-05-30 14:00:14 +02:00
Sebastiaan van Stijn
3d8195a20f daemon/logger/fluentd: cap max-retries to MaxInt32
CodeQL was warning about a potential overflow; the default value
was set to MaxInt32 in 13086f387b,
which documented that higher values caused problems, so cap it
to that value as maximum.

45873be4ae/daemon/logger/fluentd/fluentd.go (L45-L47)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-05-30 13:50:55 +02:00
Paweł Gronowski
404f29c42d gha/bin-image: Don't push sha tags
This change eliminates the automatic creation of image tags in the
format `moby/moby-bin:sha-ad132f5` for every push.

They're not too useful, produce noise and use a lot of space.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-05-30 11:43:05 +02:00
Rob Murray
a2652d4b81 Don't set up iptables chain DOCKER-USER when using nftables
Signed-off-by: Rob Murray <rob.murray@docker.com>
2025-05-29 19:12:23 +01:00
Shang Mu
6889039d76 Fix silent stop on error due to using output redirection together with set -eu.
Signed-off-by: Shang Mu <smu@princeton.edu>
2025-05-28 13:23:52 -04:00
Rob Murray
d6620915db portallocator: always check for ports allocated for 0.0.0.0/::
We set SO_REUSEADDR on sockets used for host port mappings by
docker-proxy - which means it's possible to bind the same port
on a specific address as well as 0.0.0.0/::.

For TCP sockets, an error is raised when listen() is called on
both sockets - and the port allocator will be called again to
avoid the clash (if the port was allocated from a range, otherwise
the container will just fail to start).

But, for UDP sockets, there's no listen() - so take more care
to avoid the clash in the portallocator.

The port allocator keeps a set of allocated ports for each of
the host IP addresses it's seen, including 0.0.0.0/::. So, if a
mapping to 0.0.0.0/:: is requested, find a port that's free in
the range for each of the known IP addresses (but still only
mark it as allocated against 0.0.0.0/::). And, if a port is
requested for specific host addresses, make sure it's also
free in the corresponding 0.0.0.0/:: set (but only mark it as
allocated against the specific addresses - because the same
port can be allocated against a different specific address).

Signed-off-by: Rob Murray <rob.murray@docker.com>
2025-05-28 14:00:33 +01:00
Paweł Gronowski
027588eba0 builder: Pass cdi cache instead of CDISpecDirs
Instead of passing the dirs for buildkit to configure the same cache
instance, just pass the shared CDI cache instance.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-05-28 13:31:45 +02:00
Paweł Gronowski
bc6bc7aafa daemon/cdi: Log not found dirs as INFO
Avoid logging warnings when default CDI directory does not exist:
```
WARN[2025-05-26T14:27:54.008196418Z] CDI setup error /var/run/cdi: failed to monitor for changes: no such file or directory
WARN[2025-05-26T14:27:54.008209168Z] CDI setup error /etc/cdi: failed to monitor for changes: no such file or directory
```

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-05-28 13:31:42 +02:00
Paweł Gronowski
9856bf52a2 daemon: Configure default CDI cache
And share it with BuildKit

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-05-28 13:31:40 +02:00
Rob Murray
ae2fc2ddd1 PortAllocator: Use netip.Addr instead of string as map key
Signed-off-by: Rob Murray <rob.murray@docker.com>
2025-05-28 11:38:59 +01:00
Rob Murray
19dc38f79b Listen on mapped host ports before mapping more ports
Because we set SO_REUSEADDR on sockets for host ports, if there
are port mappings for INADDR_ANY (the default) as well as for
specific host ports - bind() cannot be used to detect clashes.

That means, for example, on daemon startup, if the port allocator
returns the first port in its ephemeral range for a specific host
adddress, and the next port mapping is for 0.0.0.0 - the same port
is returned and both bind() calls succeed. Then, the container
fails to start later when listen() spots the problem and it's too
late to find another port.

So, bind and listen to each set of ports as they're allocated
instead of just binding.

Signed-off-by: Rob Murray <rob.murray@docker.com>
2025-05-28 11:38:59 +01:00
Paweł Gronowski
f834a0bd82 vendor: github.com/miekg/dns v1.1.66
full diff: https://github.com/miekg/dns/compare/v1.1.61...v1.1.66

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-05-27 15:09:09 +02:00
2057 changed files with 50467 additions and 21457 deletions

View File

@@ -16,7 +16,7 @@ on:
workflow_call:
env:
GO_VERSION: "1.24.3"
GO_VERSION: "1.24.4"
GOTESTLIST_VERSION: v0.3.1
TESTSTAT_VERSION: v0.1.25
SETUP_BUILDX_VERSION: edge

View File

@@ -21,7 +21,7 @@ on:
default: "graphdriver"
env:
GO_VERSION: "1.24.3"
GO_VERSION: "1.24.4"
GOTESTLIST_VERSION: v0.3.1
TESTSTAT_VERSION: v0.1.25
ITG_CLI_MATRIX_SIZE: 6

View File

@@ -28,7 +28,7 @@ on:
default: false
env:
GO_VERSION: "1.24.3"
GO_VERSION: "1.24.4"
GOTESTLIST_VERSION: v0.3.1
TESTSTAT_VERSION: v0.1.25
WINDOWS_BASE_IMAGE: mcr.microsoft.com/windows/servercore

View File

@@ -23,7 +23,7 @@ on:
pull_request:
env:
GO_VERSION: "1.24.3"
GO_VERSION: "1.24.4"
TESTSTAT_VERSION: v0.1.25
DESTDIR: ./build
SETUP_BUILDX_VERSION: edge

View File

@@ -65,13 +65,10 @@ jobs:
# moby/moby-bin:master
## push on 23.0 branch
# moby/moby-bin:23.0
## any push
# moby/moby-bin:sha-ad132f5
tags: |
type=semver,pattern={{version}}
type=ref,event=branch
type=ref,event=pr
type=sha
-
name: Rename meta bake definition file
# see https://github.com/docker/metadata-action/issues/381#issuecomment-1918607161
@@ -94,7 +91,7 @@ jobs:
build:
runs-on: ubuntu-24.04
timeout-minutes: 120 # guardrails timeout for the whole job
timeout-minutes: 20 # guardrails timeout for the whole job
needs:
- validate-dco
- prepare
@@ -170,7 +167,7 @@ jobs:
merge:
runs-on: ubuntu-24.04
timeout-minutes: 120 # guardrails timeout for the whole job
timeout-minutes: 40 # guardrails timeout for the whole job
needs:
- build
if: always() && !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled') && github.event_name != 'pull_request' && github.repository == 'moby/moby'

View File

@@ -23,7 +23,7 @@ on:
pull_request:
env:
GO_VERSION: "1.24.3"
GO_VERSION: "1.24.4"
DESTDIR: ./build
SETUP_BUILDX_VERSION: edge
SETUP_BUILDKIT_IMAGE: moby/buildkit:latest

View File

@@ -58,7 +58,7 @@ jobs:
- name: Update Go
uses: actions/setup-go@v5
with:
go-version: "1.24.3"
go-version: "1.24.4"
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:

View File

@@ -23,7 +23,7 @@ on:
pull_request:
env:
GO_VERSION: "1.24.3"
GO_VERSION: "1.24.4"
GIT_PAGER: "cat"
PAGER: "cat"
SETUP_BUILDX_VERSION: edge

View File

@@ -3,7 +3,7 @@ version: "2"
run:
# prevent golangci-lint from deducting the go version to lint for through go.mod,
# which causes it to fallback to go1.17 semantics.
go: "1.24.3"
go: "1.24.4"
concurrency: 2
# Only supported with go modules enabled (build flag -mod=vendor only valid when using modules)
# modules-download-mode: vendor
@@ -21,12 +21,14 @@ linters:
- dogsled # Detects assignments with too many blank identifiers.
- dupword # Detects duplicate words.
- durationcheck # Detect cases where two time.Duration values are being multiplied in possibly erroneous ways.
- errorlint # Detects code that will cause problems with the error wrapping scheme introduced in Go 1.13.
- errchkjson # Detects unsupported types passed to json encoding functions and reports if checks for the returned error can be omitted.
- exhaustive # Detects missing options in enum switch statements.
- exptostd # Detects functions from golang.org/x/exp/ that can be replaced by std functions.
- fatcontext # Detects nested contexts in loops and function literals.
- forbidigo
- gocheckcompilerdirectives # Detects invalid go compiler directive comments (//go:).
- gocritic # Detects for bugs, performance and style issues.
- gosec # Detects security problems.
- govet
- iface # Detects incorrect use of interfaces. Currently only used for "identical" interfaces in the same package.
@@ -42,6 +44,7 @@ linters:
- revive # Metalinter; drop-in replacement for golint.
- spancheck # Detects mistakes with OpenTelemetry/Census spans.
- staticcheck
- thelper
- unconvert # Detects unnecessary type conversions.
- unused
- usestdlibvars # Detects the possibility to use variables/constants from the Go standard library.
@@ -73,6 +76,13 @@ linters:
- "false" # some tests use this as expected output
- "root" # for tests using "ls" output with files owned by "root:root"
errorlint:
# Check whether fmt.Errorf uses the %w verb for formatting errors.
# See the https://github.com/polyfloyd/go-errorlint for caveats.
errorf: false
# Check for plain type assertions and type switches.
asserts: false
exhaustive:
# Program elements to check for exhaustiveness.
# Default: [ switch ]
@@ -102,6 +112,56 @@ linters:
msg: Add a wrapper to nlwrap.Handle for EINTR handling and update the list in .golangci.yml.
analyze-types: true
gocritic:
disabled-checks:
- appendAssign
- appendCombine
- assignOp
- builtinShadow
- builtinShadowDecl
- captLocal
- commentedOutCode
- deferInLoop
- dupImport
- dupSubExpr
- elseif
- emptyFallthrough
- equalFold
- evalOrder
- exitAfterDefer
- exposedSyncMutex
- filepathJoin
- hexLiteral
- hugeParam
- ifElseChain
- importShadow
- indexAlloc
- methodExprCall
- nestingReduce
- nilValReturn
- octalLiteral
- paramTypeCombine
- preferStringWriter
- ptrToRefParam
- rangeValCopy
- redundantSprint
- regexpMust
- regexpSimplify
- singleCaseSwitch
- sloppyReassign
- stringXbytes
- typeAssertChain
- typeDefFirst
- typeUnparen
- uncheckedInlineErr
- unlambda
- unnamedResult
- unnecessaryDefer
- unslice
- valSwap
- whyNoLint
enable-all: true
gosec:
excludes:
- G104 # G104: Errors unhandled; (TODO: reduce unhandled errors, or explicitly ignore)
@@ -164,6 +224,30 @@ linters:
- record-error # check that `span.RecordError(err)` is called when an error is returned
- set-status # check that `span.SetStatus(codes.Error, msg)` is called when an error is returned
thelper:
test:
# Check *testing.T is first param (or after context.Context) of helper function.
first: false
# Check t.Helper() begins helper function.
begin: false
benchmark:
# Check *testing.B is first param (or after context.Context) of helper function.
first: false
# Check b.Helper() begins helper function.
begin: false
tb:
# Check *testing.TB is first param (or after context.Context) of helper function.
first: false
# Check *testing.TB param has name tb.
name: false
# Check tb.Helper() begins helper function.
begin: false
fuzz:
# Check *testing.F is first param (or after context.Context) of helper function.
first: false
# Check f.Helper() begins helper function.
begin: false
usestdlibvars:
# Suggest the use of http.MethodXX.
http-method: true
@@ -220,7 +304,7 @@ linters:
- staticcheck
# FIXME(thaJeztah): ignoring these transitional utilities until BuildKit is vendored with https://github.com/moby/moby/pull/49743
- text: "SA1019: idtools\\.(ToUserIdentityMapping|FromUserIdentityMapping) is deprecated"
- text: "SA1019: idtools\\.(ToUserIdentityMapping|FromUserIdentityMapping|IdentityMapping) is deprecated"
linters:
- staticcheck

View File

@@ -83,6 +83,39 @@ contributions, see [the advanced contribution
section](https://docs.docker.com/opensource/workflow/advanced-contributing/) in
the contributors guide.
### Where to put your changes
You can make changes to any Go package within Moby outside of the vendor directory. There are no
restrictions on packages but a few guidelines to follow for deciding on making these changes.
When adding new packages, first consider putting them in an internal directory to prevent
unintended importing from other modules. Code changes should either go under `api`, `client`,
or `daemon` modules, or one of the integration test directories.
Try to put a new package under the appropriate directories. The root directory is reserved for
configuration and build files, no source files will be accepted in the root.
- `api` - All types shared by client and daemon along with swagger definitions.
- `client` - All Go files for the docker client
- `contrib` - Files, configurations, and packages related to external tools or libraries
- `daemon` - All Go files and packages for building the daemon
- `docs` - All Moby technical documentation using markdown
- `hack` - All scripts used for testing, development, and CI
- `integration` - Testing the integration of the API, client, and daemon
- `integration-cli` - Deprecated integration tests of the docker cli with the daemon, no new tests allowed
- `pkg` - Legacy Go packages used externally, no new packages should be added here
- `project` - All files related to Moby project governance
- `vendor` - Autogenerated vendor files from `make vendor` command, do not manually edit files here
The daemon module has many subpackages. Consider putting new packages under one of these
directories.
- `daemon/cmd` - All Go main packages and the packages used only for that main package
- `daemon/internal` - All utility packages used by daemon and not intended for external use
- `daemon/man`- All Moby reference manuals used for the `man` command
- `daemon/plugins` - All included daemon plugins which are intended to be registered via init
- `daemon/pkg` - All libraries used by daemon and for integration testing
- `daemon/version` - Version package with the current daemon version
### Connect with other Moby Project contributors
<table class="tg">

View File

@@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1
ARG GO_VERSION=1.24.3
ARG GO_VERSION=1.24.4
ARG BASE_DEBIAN_DISTRO="bookworm"
ARG GOLANG_IMAGE="golang:${GO_VERSION}-${BASE_DEBIAN_DISTRO}"
ARG XX_VERSION=1.6.1
@@ -10,7 +10,7 @@ ARG XX_VERSION=1.6.1
ARG VPNKIT_VERSION=0.6.0
# DOCKERCLI_VERSION is the version of the CLI to install in the dev-container.
ARG DOCKERCLI_VERSION=v28.2.0-rc.2
ARG DOCKERCLI_VERSION=v28.2.2
ARG DOCKERCLI_REPOSITORY="https://github.com/docker/cli.git"
# cli version used for integration-cli tests

View File

@@ -5,7 +5,7 @@
# This represents the bare minimum required to build and test Docker.
ARG GO_VERSION=1.24.3
ARG GO_VERSION=1.24.4
ARG BASE_DEBIAN_DISTRO="bookworm"
ARG GOLANG_IMAGE="golang:${GO_VERSION}-${BASE_DEBIAN_DISTRO}"

View File

@@ -161,7 +161,7 @@ FROM ${WINDOWS_BASE_IMAGE}:${WINDOWS_BASE_IMAGE_TAG}
# Use PowerShell as the default shell
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
ARG GO_VERSION=1.24.3
ARG GO_VERSION=1.24.4
ARG GOTESTSUM_VERSION=v1.12.0
# GOWINRES_VERSION is the version of go-winres to install.

View File

@@ -203,7 +203,7 @@ build: shell_target := --target=dev-base
else
build: shell_target := --target=dev
endif
build: bundles
build: validate-bind-dir bundles
$(BUILD_CMD) $(BUILD_OPTS) $(shell_target) --load -t "$(DOCKER_IMAGE)" .
.PHONY: shell
@@ -284,3 +284,10 @@ generate-files:
--file "./hack/dockerfiles/generate-files.Dockerfile" .
cp -R "$($@_TMP_OUT)"/. .
rm -rf "$($@_TMP_OUT)"/*
.PHONY: validate-bind-dir
validate-bind-dir:
@case "$(BIND_DIR)" in \
".."*|"/"*) echo "Make needs to be run from the project-root directory, with BIND_DIR set to \".\" or a subdir"; \
exit 1 ;; \
esac

View File

@@ -1,9 +1,9 @@
package api // import "github.com/docker/docker/api"
package api
// Common constants for daemon and client.
const (
// DefaultVersion of the current REST API.
DefaultVersion = "1.50"
DefaultVersion = "1.51"
// MinSupportedAPIVersion is the minimum API version that can be supported
// by the API server, specified as "major.minor". Note that the daemon

View File

@@ -1,4 +1,4 @@
package build // import "github.com/docker/docker/api/server/backend/build"
package build
import (
"context"

View File

@@ -1,4 +1,4 @@
package build // import "github.com/docker/docker/api/server/backend/build"
package build
import (
"context"

View File

@@ -1,4 +1,4 @@
package httpstatus // import "github.com/docker/docker/api/server/httpstatus"
package httpstatus
import (
"context"

View File

@@ -1,4 +1,4 @@
package httputils // import "github.com/docker/docker/api/server/httputils"
package httputils
import (
"io"

View File

@@ -1,4 +1,4 @@
package httputils // import "github.com/docker/docker/api/server/httputils"
package httputils
import (
"encoding/json"

View File

@@ -1,4 +1,4 @@
package httputils // import "github.com/docker/docker/api/server/httputils"
package httputils
import (
"math"
@@ -30,7 +30,7 @@ func TestBoolValue(t *testing.T) {
for c, e := range cases {
v := url.Values{}
v.Set("test", c)
r, _ := http.NewRequest(http.MethodPost, "", nil)
r, _ := http.NewRequest(http.MethodPost, "", http.NoBody)
r.Form = v
a := BoolValue(r, "test")
@@ -41,14 +41,14 @@ func TestBoolValue(t *testing.T) {
}
func TestBoolValueOrDefault(t *testing.T) {
r, _ := http.NewRequest(http.MethodGet, "", nil)
r, _ := http.NewRequest(http.MethodGet, "", http.NoBody)
if !BoolValueOrDefault(r, "queryparam", true) {
t.Fatal("Expected to get true default value, got false")
}
v := url.Values{}
v.Set("param", "")
r, _ = http.NewRequest(http.MethodGet, "", nil)
r, _ = http.NewRequest(http.MethodGet, "", http.NoBody)
r.Form = v
if BoolValueOrDefault(r, "param", true) {
t.Fatal("Expected not to get true")
@@ -66,7 +66,7 @@ func TestInt64ValueOrZero(t *testing.T) {
for c, e := range cases {
v := url.Values{}
v.Set("test", c)
r, _ := http.NewRequest(http.MethodPost, "", nil)
r, _ := http.NewRequest(http.MethodPost, "", http.NoBody)
r.Form = v
a := Int64ValueOrZero(r, "test")
@@ -86,7 +86,7 @@ func TestInt64ValueOrDefault(t *testing.T) {
for c, e := range cases {
v := url.Values{}
v.Set("test", c)
r, _ := http.NewRequest(http.MethodPost, "", nil)
r, _ := http.NewRequest(http.MethodPost, "", http.NoBody)
r.Form = v
a, err := Int64ValueOrDefault(r, "test", -1)
@@ -102,7 +102,7 @@ func TestInt64ValueOrDefault(t *testing.T) {
func TestInt64ValueOrDefaultWithError(t *testing.T) {
v := url.Values{}
v.Set("test", "invalid")
r, _ := http.NewRequest(http.MethodPost, "", nil)
r, _ := http.NewRequest(http.MethodPost, "", http.NoBody)
r.Form = v
_, err := Int64ValueOrDefault(r, "test", -1)
@@ -150,7 +150,7 @@ func TestUint32Value(t *testing.T) {
}
for _, tc := range tests {
t.Run(tc.value, func(t *testing.T) {
r, _ := http.NewRequest(http.MethodPost, "", nil)
r, _ := http.NewRequest(http.MethodPost, "", http.NoBody)
r.Form = url.Values{}
if tc.value != valueNotSet {
r.Form.Set("field", tc.value)

View File

@@ -1,4 +1,4 @@
package httputils // import "github.com/docker/docker/api/server/httputils"
package httputils
import (
"context"
@@ -74,7 +74,7 @@ func ReadJSON(r *http.Request, out interface{}) error {
err = dec.Decode(out)
defer r.Body.Close()
if err != nil {
if err == io.EOF {
if errors.Is(err, io.EOF) {
return errdefs.InvalidParameter(errors.New("invalid JSON: got EOF while reading request body"))
}
return errdefs.InvalidParameter(errors.Wrap(err, "invalid JSON"))

View File

@@ -1,4 +1,4 @@
package httputils // import "github.com/docker/docker/api/server/httputils"
package httputils
import (
"net/http"
@@ -33,7 +33,7 @@ func TestJsonContentType(t *testing.T) {
func TestReadJSON(t *testing.T) {
t.Run("nil body", func(t *testing.T) {
req, err := http.NewRequest(http.MethodPost, "https://example.com/some/path", nil)
req, err := http.NewRequest(http.MethodPost, "https://example.com/some/path", http.NoBody)
if err != nil {
t.Error(err)
}

View File

@@ -1,4 +1,4 @@
package httputils // import "github.com/docker/docker/api/server/httputils"
package httputils
import (
"context"

View File

@@ -1,4 +1,4 @@
package server // import "github.com/docker/docker/api/server"
package server
import (
"github.com/containerd/log"

View File

@@ -1,4 +1,4 @@
package middleware // import "github.com/docker/docker/api/server/middleware"
package middleware
import (
"bufio"

View File

@@ -1,4 +1,4 @@
package middleware // import "github.com/docker/docker/api/server/middleware"
package middleware
import (
"testing"

View File

@@ -1,4 +1,4 @@
package middleware // import "github.com/docker/docker/api/server/middleware"
package middleware
import (
"context"

View File

@@ -1,4 +1,4 @@
package middleware // import "github.com/docker/docker/api/server/middleware"
package middleware
import (
"context"

View File

@@ -1,4 +1,4 @@
package middleware // import "github.com/docker/docker/api/server/middleware"
package middleware
import (
"context"

View File

@@ -1,4 +1,4 @@
package middleware // import "github.com/docker/docker/api/server/middleware"
package middleware
import (
"context"
@@ -79,7 +79,7 @@ func TestVersionMiddlewareVersion(t *testing.T) {
assert.NilError(t, err)
h := m.WrapHandler(handler)
req, _ := http.NewRequest(http.MethodGet, "/containers/json", nil)
req, _ := http.NewRequest(http.MethodGet, "/containers/json", http.NoBody)
resp := httptest.NewRecorder()
ctx := context.Background()
@@ -121,7 +121,7 @@ func TestVersionMiddlewareVersion(t *testing.T) {
func TestVersionMiddlewareWithErrorsReturnsHeaders(t *testing.T) {
handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, vars map[string]string) error {
v := httputils.VersionFromContext(ctx)
assert.Check(t, len(v) != 0)
assert.Check(t, v != "")
return nil
}
@@ -129,7 +129,7 @@ func TestVersionMiddlewareWithErrorsReturnsHeaders(t *testing.T) {
assert.NilError(t, err)
h := m.WrapHandler(handler)
req, _ := http.NewRequest(http.MethodGet, "/containers/json", nil)
req, _ := http.NewRequest(http.MethodGet, "/containers/json", http.NoBody)
resp := httptest.NewRecorder()
ctx := context.Background()

View File

@@ -1,4 +1,4 @@
package build // import "github.com/docker/docker/api/server/router/build"
package build
import (
"context"

View File

@@ -1,4 +1,4 @@
package build // import "github.com/docker/docker/api/server/router/build"
package build
import (
"runtime"

View File

@@ -1,4 +1,4 @@
package build // import "github.com/docker/docker/api/server/router/build"
package build
import (
"bufio"

View File

@@ -1,4 +1,4 @@
package checkpoint // import "github.com/docker/docker/api/server/router/checkpoint"
package checkpoint
import "github.com/docker/docker/api/types/checkpoint"

View File

@@ -1,4 +1,4 @@
package checkpoint // import "github.com/docker/docker/api/server/router/checkpoint"
package checkpoint
import (
"github.com/docker/docker/api/server/httputils"

View File

@@ -1,4 +1,4 @@
package checkpoint // import "github.com/docker/docker/api/server/router/checkpoint"
package checkpoint
import (
"context"

View File

@@ -1,4 +1,4 @@
package container // import "github.com/docker/docker/api/server/router/container"
package container
import (
"context"

View File

@@ -1,4 +1,4 @@
package container // import "github.com/docker/docker/api/server/router/container"
package container
import (
"github.com/docker/docker/api/server/httputils"

View File

@@ -1,4 +1,4 @@
package container // import "github.com/docker/docker/api/server/router/container"
package container
import (
"context"

View File

@@ -1,4 +1,4 @@
package container // import "github.com/docker/docker/api/server/router/container"
package container
import (
"compress/flate"

View File

@@ -1,4 +1,4 @@
package container // import "github.com/docker/docker/api/server/router/container"
package container
import (
"context"

View File

@@ -1,7 +1,7 @@
// FIXME(thaJeztah): remove once we are a module; the go:build directive prevents go from downgrading language version to go1.16:
//go:build go1.23
package container // import "github.com/docker/docker/api/server/router/container"
package container
import (
"context"

View File

@@ -1,4 +1,4 @@
package debug // import "github.com/docker/docker/api/server/router/debug"
package debug
import (
"context"

View File

@@ -1,4 +1,4 @@
package debug // import "github.com/docker/docker/api/server/router/debug"
package debug
import (
"context"

View File

@@ -1,4 +1,4 @@
package distribution // import "github.com/docker/docker/api/server/router/distribution"
package distribution
import (
"context"

View File

@@ -1,4 +1,4 @@
package distribution // import "github.com/docker/docker/api/server/router/distribution"
package distribution
import "github.com/docker/docker/api/server/router"

View File

@@ -1,4 +1,4 @@
package distribution // import "github.com/docker/docker/api/server/router/distribution"
package distribution
import (
"context"
@@ -108,14 +108,14 @@ func (dr *distributionRouter) fetchManifest(ctx context.Context, distrepo distri
}
mnfst, err := mnfstsrvc.Get(ctx, distributionInspect.Descriptor.Digest)
if err != nil {
switch err {
case reference.ErrReferenceInvalidFormat,
reference.ErrTagInvalidFormat,
reference.ErrDigestInvalidFormat,
reference.ErrNameContainsUppercase,
reference.ErrNameEmpty,
reference.ErrNameTooLong,
reference.ErrNameNotCanonical:
switch {
case errors.Is(err, reference.ErrReferenceInvalidFormat),
errors.Is(err, reference.ErrTagInvalidFormat),
errors.Is(err, reference.ErrDigestInvalidFormat),
errors.Is(err, reference.ErrNameContainsUppercase),
errors.Is(err, reference.ErrNameEmpty),
errors.Is(err, reference.ErrNameTooLong),
errors.Is(err, reference.ErrNameNotCanonical):
return registry.DistributionInspect{}, errdefs.InvalidParameter(err)
}
return registry.DistributionInspect{}, err

View File

@@ -1,4 +1,4 @@
package router // import "github.com/docker/docker/api/server/router"
package router
import (
"context"

View File

@@ -1,4 +1,4 @@
package grpc // import "github.com/docker/docker/api/server/router/grpc"
package grpc
import "google.golang.org/grpc"

View File

@@ -1,7 +1,7 @@
// FIXME(thaJeztah): remove once we are a module; the go:build directive prevents go from downgrading language version to go1.16:
//go:build go1.23
package grpc // import "github.com/docker/docker/api/server/router/grpc"
package grpc
import (
"context"

View File

@@ -1,4 +1,4 @@
package grpc // import "github.com/docker/docker/api/server/router/grpc"
package grpc
import (
"context"

View File

@@ -1,4 +1,4 @@
package image // import "github.com/docker/docker/api/server/router/image"
package image
import (
"context"

View File

@@ -1,4 +1,4 @@
package image // import "github.com/docker/docker/api/server/router/image"
package image
import (
"github.com/docker/docker/api/server/router"

View File

@@ -1,4 +1,4 @@
package image // import "github.com/docker/docker/api/server/router/image"
package image
import (
"context"
@@ -15,7 +15,6 @@ import (
"github.com/docker/docker/api"
"github.com/docker/docker/api/server/httputils"
"github.com/docker/docker/api/types/backend"
"github.com/docker/docker/api/types/container"
"github.com/docker/docker/api/types/filters"
imagetypes "github.com/docker/docker/api/types/image"
"github.com/docker/docker/api/types/registry"
@@ -27,8 +26,6 @@ import (
"github.com/docker/docker/pkg/ioutils"
"github.com/docker/docker/pkg/progress"
"github.com/docker/docker/pkg/streamformatter"
"github.com/docker/go-connections/nat"
dockerspec "github.com/moby/docker-image-spec/specs-go/v1"
"github.com/opencontainers/go-digest"
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
"github.com/pkg/errors"
@@ -113,7 +110,7 @@ func (ir *imageRouter) postImagesCreate(ctx context.Context, w http.ResponseWrit
return errdefs.InvalidParameter(err)
}
if len(comment) == 0 {
if comment == "" {
comment = "Imported from " + src
}
@@ -370,7 +367,7 @@ func (ir *imageRouter) getImagesByName(ctx context.Context, w http.ResponseWrite
return errdefs.InvalidParameter(errors.New("conflicting options: manifests and platform options cannot both be set"))
}
imageInspect, err := ir.backend.ImageInspect(ctx, vars["name"], backend.ImageInspectOpts{
resp, err := ir.backend.ImageInspect(ctx, vars["name"], backend.ImageInspectOpts{
Manifests: manifests,
Platform: platform,
})
@@ -378,6 +375,14 @@ func (ir *imageRouter) getImagesByName(ctx context.Context, w http.ResponseWrite
return err
}
// inspectResponse preserves fields in the response that have an
// "omitempty" in the OCI spec, but didn't omit such fields in
// legacy responses before API v1.50.
imageInspect := &inspectCompatResponse{
InspectResponse: resp,
legacyConfig: legacyConfigFields["current"],
}
// Make sure we output empty arrays instead of nil. While Go nil slice is functionally equivalent to an empty slice,
// it matters for the JSON representation.
if imageInspect.RepoTags == nil {
@@ -405,14 +410,7 @@ func (ir *imageRouter) getImagesByName(ctx context.Context, w http.ResponseWrite
imageInspect.Descriptor = nil
}
if versions.LessThan(version, "1.50") {
type imageInspectLegacy struct {
imagetypes.InspectResponse
LegacyConfig *container.Config `json:"Config"`
}
return httputils.WriteJSON(w, http.StatusOK, imageInspectLegacy{
InspectResponse: *imageInspect,
LegacyConfig: dockerOCIImageConfigToContainerConfig(*imageInspect.Config),
})
imageInspect.legacyConfig = legacyConfigFields["v1.49"]
}
return httputils.WriteJSON(w, http.StatusOK, imageInspect)
@@ -461,6 +459,7 @@ func (ir *imageRouter) getImagesJSON(ctx context.Context, w http.ResponseWriter,
useNone := versions.LessThan(version, "1.43")
withVirtualSize := versions.LessThan(version, "1.44")
noDescriptor := versions.LessThan(version, "1.48")
noContainers := versions.LessThan(version, "1.51")
for _, img := range images {
if useNone {
if len(img.RepoTags) == 0 && len(img.RepoDigests) == 0 {
@@ -481,6 +480,9 @@ func (ir *imageRouter) getImagesJSON(ctx context.Context, w http.ResponseWriter,
if noDescriptor {
img.Descriptor = nil
}
if noContainers {
img.Containers = -1
}
}
return httputils.WriteJSON(w, http.StatusOK, images)
@@ -598,27 +600,3 @@ func validateRepoName(name reference.Named) error {
}
return nil
}
// FIXME(thaJeztah): this is a copy of dockerOCIImageConfigToContainerConfig in daemon/containerd: https://github.com/moby/moby/blob/6b617699c500522aa6526cfcae4558333911b11f/daemon/containerd/imagespec.go#L107-L128
func dockerOCIImageConfigToContainerConfig(cfg dockerspec.DockerOCIImageConfig) *container.Config {
exposedPorts := make(nat.PortSet, len(cfg.ExposedPorts))
for k, v := range cfg.ExposedPorts {
exposedPorts[nat.Port(k)] = v
}
return &container.Config{
Entrypoint: cfg.Entrypoint,
Env: cfg.Env,
Cmd: cfg.Cmd,
User: cfg.User,
WorkingDir: cfg.WorkingDir,
ExposedPorts: exposedPorts,
Volumes: cfg.Volumes,
Labels: cfg.Labels,
ArgsEscaped: cfg.ArgsEscaped, //nolint:staticcheck // Ignore SA1019. Need to keep it in image.
StopSignal: cfg.StopSignal,
Healthcheck: cfg.Healthcheck,
OnBuild: cfg.OnBuild,
Shell: cfg.Shell,
}
}

View File

@@ -0,0 +1,88 @@
// FIXME(thaJeztah): remove once we are a module; the go:build directive prevents go from downgrading language version to go1.16:
//go:build go1.23
package image
import (
"encoding/json"
"maps"
"github.com/docker/docker/api/types/image"
)
// legacyConfigFields defines legacy image-config fields to include in
// API responses on older API versions.
var legacyConfigFields = map[string]map[string]any{
// Legacy fields for API v1.49 and lower. These fields are deprecated
// and omitted in newer API versions; see https://github.com/moby/moby/pull/48457
"v1.49": {
"AttachStderr": false,
"AttachStdin": false,
"AttachStdout": false,
"Cmd": nil,
"Domainname": "",
"Entrypoint": nil,
"Env": nil,
"Hostname": "",
"Image": "",
"Labels": nil,
"OnBuild": nil,
"OpenStdin": false,
"StdinOnce": false,
"Tty": false,
"User": "",
"Volumes": nil,
"WorkingDir": "",
},
// Legacy fields for current API versions (v1.50 and up). These fields
// did not have an "omitempty" and were always included in the response,
// even if not set; see https://github.com/moby/moby/issues/50134
"current": {
"Cmd": nil,
"Entrypoint": nil,
"Env": nil,
"Labels": nil,
"OnBuild": nil,
"User": "",
"Volumes": nil,
"WorkingDir": "",
},
}
// inspectCompatResponse is a wrapper around [image.InspectResponse] with a
// custom marshal function for legacy [api/types/container.Config} fields
// that have been removed, or did not have omitempty.
type inspectCompatResponse struct {
*image.InspectResponse
legacyConfig map[string]any
}
// MarshalJSON implements a custom marshaler to include legacy fields
// in API responses.
func (ir *inspectCompatResponse) MarshalJSON() ([]byte, error) {
type tmp *image.InspectResponse
base, err := json.Marshal((tmp)(ir.InspectResponse))
if err != nil {
return nil, err
}
if len(ir.legacyConfig) == 0 {
return base, nil
}
type resp struct {
*image.InspectResponse
Config map[string]any
}
var merged resp
err = json.Unmarshal(base, &merged)
if err != nil {
return base, nil
}
// prevent mutating legacyConfigFields.
cfg := maps.Clone(ir.legacyConfig)
maps.Copy(cfg, merged.Config)
merged.Config = cfg
return json.Marshal(merged)
}

View File

@@ -0,0 +1,74 @@
package image
import (
"encoding/json"
"testing"
"github.com/docker/docker/api/types/image"
dockerspec "github.com/moby/docker-image-spec/specs-go/v1"
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
"gotest.tools/v3/assert"
is "gotest.tools/v3/assert/cmp"
)
func TestInspectResponse(t *testing.T) {
tests := []struct {
doc string
cfg *ocispec.ImageConfig
legacyConfig map[string]any
expected string
}{
{
doc: "empty",
expected: `null`,
},
{
doc: "no legacy config",
cfg: &ocispec.ImageConfig{
Cmd: []string{"/bin/sh"},
StopSignal: "SIGQUIT",
},
expected: `{"Cmd":["/bin/sh"],"StopSignal":"SIGQUIT"}`,
},
{
doc: "api < v1.50",
cfg: &ocispec.ImageConfig{
Cmd: []string{"/bin/sh"},
StopSignal: "SIGQUIT",
},
legacyConfig: legacyConfigFields["v1.49"],
expected: `{"AttachStderr":false,"AttachStdin":false,"AttachStdout":false,"Cmd":["/bin/sh"],"Domainname":"","Entrypoint":null,"Env":null,"Hostname":"","Image":"","Labels":null,"OnBuild":null,"OpenStdin":false,"StdinOnce":false,"StopSignal":"SIGQUIT","Tty":false,"User":"","Volumes":null,"WorkingDir":""}`,
},
{
doc: "api >= v1.50",
cfg: &ocispec.ImageConfig{
Cmd: []string{"/bin/sh"},
StopSignal: "SIGQUIT",
},
legacyConfig: legacyConfigFields["current"],
expected: `{"Cmd":["/bin/sh"],"Entrypoint":null,"Env":null,"Labels":null,"OnBuild":null,"StopSignal":"SIGQUIT","User":"","Volumes":null,"WorkingDir":""}`,
},
}
for _, tc := range tests {
t.Run(tc.doc, func(t *testing.T) {
imgInspect := &image.InspectResponse{}
if tc.cfg != nil {
// Verify that fields that are set override the legacy values,
// or appended if not part of the legacy values.
imgInspect.Config = &dockerspec.DockerOCIImageConfig{
ImageConfig: *tc.cfg,
}
}
out, err := json.Marshal(&inspectCompatResponse{
InspectResponse: imgInspect,
legacyConfig: tc.legacyConfig,
})
assert.NilError(t, err)
var outMap struct{ Config json.RawMessage }
err = json.Unmarshal(out, &outMap)
assert.NilError(t, err)
assert.Check(t, is.Equal(string(outMap.Config), tc.expected))
})
}
}

View File

@@ -1,4 +1,4 @@
package router // import "github.com/docker/docker/api/server/router"
package router
import (
"net/http"

View File

@@ -1,4 +1,4 @@
package network // import "github.com/docker/docker/api/server/router/network"
package network
import (
"context"

View File

@@ -1,4 +1,4 @@
package network // import "github.com/docker/docker/api/server/router/network"
package network
import (
"github.com/docker/docker/api/server/router"

View File

@@ -1,4 +1,4 @@
package network // import "github.com/docker/docker/api/server/router/network"
package network
import (
"context"

View File

@@ -1,4 +1,4 @@
package plugin // import "github.com/docker/docker/api/server/router/plugin"
package plugin
import (
"context"

View File

@@ -1,4 +1,4 @@
package plugin // import "github.com/docker/docker/api/server/router/plugin"
package plugin
import "github.com/docker/docker/api/server/router"

View File

@@ -1,4 +1,4 @@
package plugin // import "github.com/docker/docker/api/server/router/plugin"
package plugin
import (
"context"

View File

@@ -1,4 +1,4 @@
package router // import "github.com/docker/docker/api/server/router"
package router
import "github.com/docker/docker/api/server/httputils"

View File

@@ -1,4 +1,4 @@
package session // import "github.com/docker/docker/api/server/router/session"
package session
import (
"context"

View File

@@ -1,4 +1,4 @@
package session // import "github.com/docker/docker/api/server/router/session"
package session
import "github.com/docker/docker/api/server/router"

View File

@@ -1,4 +1,4 @@
package session // import "github.com/docker/docker/api/server/router/session"
package session
import (
"context"

View File

@@ -1,4 +1,4 @@
package swarm // import "github.com/docker/docker/api/server/router/swarm"
package swarm
import (
"context"

View File

@@ -1,4 +1,4 @@
package swarm // import "github.com/docker/docker/api/server/router/swarm"
package swarm
import "github.com/docker/docker/api/server/router"

View File

@@ -1,4 +1,4 @@
package swarm // import "github.com/docker/docker/api/server/router/swarm"
package swarm
import (
"context"

View File

@@ -1,4 +1,4 @@
package swarm // import "github.com/docker/docker/api/server/router/swarm"
package swarm
import (
"context"

View File

@@ -1,4 +1,4 @@
package swarm // import "github.com/docker/docker/api/server/router/swarm"
package swarm
import (
"reflect"

View File

@@ -1,4 +1,4 @@
package system // import "github.com/docker/docker/api/server/router/system"
package system
import (
"context"

View File

@@ -1,7 +1,7 @@
// FIXME(thaJeztah): remove once we are a module; the go:build directive prevents go from downgrading language version to go1.16:
//go:build go1.23
package system // import "github.com/docker/docker/api/server/router/system"
package system
import (
"github.com/docker/docker/api/server/router"

View File

@@ -1,7 +1,7 @@
// FIXME(thaJeztah): remove once we are a module; the go:build directive prevents go from downgrading language version to go1.16:
//go:build go1.23
package system // import "github.com/docker/docker/api/server/router/system"
package system
import (
"context"

View File

@@ -1,4 +1,4 @@
package volume // import "github.com/docker/docker/api/server/router/volume"
package volume
import (
"context"

View File

@@ -1,4 +1,4 @@
package volume // import "github.com/docker/docker/api/server/router/volume"
package volume
import "github.com/docker/docker/api/server/router"

View File

@@ -1,4 +1,4 @@
package volume // import "github.com/docker/docker/api/server/router/volume"
package volume
import (
"context"

View File

@@ -22,7 +22,7 @@ import (
func callGetVolume(v *volumeRouter, name string) (*httptest.ResponseRecorder, error) {
ctx := context.WithValue(context.Background(), httputils.APIVersionKey{}, clusterVolumesVersion)
vars := map[string]string{"name": name}
req := httptest.NewRequest(http.MethodGet, fmt.Sprintf("/volumes/%s", name), nil)
req := httptest.NewRequest(http.MethodGet, fmt.Sprintf("/volumes/%s", name), http.NoBody)
resp := httptest.NewRecorder()
err := v.getVolumeByName(ctx, resp, req, vars)
@@ -32,7 +32,7 @@ func callGetVolume(v *volumeRouter, name string) (*httptest.ResponseRecorder, er
func callListVolumes(v *volumeRouter) (*httptest.ResponseRecorder, error) {
ctx := context.WithValue(context.Background(), httputils.APIVersionKey{}, clusterVolumesVersion)
vars := map[string]string{}
req := httptest.NewRequest(http.MethodGet, "/volumes", nil)
req := httptest.NewRequest(http.MethodGet, "/volumes", http.NoBody)
resp := httptest.NewRecorder()
err := v.getVolumesList(ctx, resp, req, vars)
@@ -428,7 +428,7 @@ func TestVolumeRemove(t *testing.T) {
}
ctx := context.WithValue(context.Background(), httputils.APIVersionKey{}, clusterVolumesVersion)
req := httptest.NewRequest(http.MethodDelete, "/volumes/vol1", nil)
req := httptest.NewRequest(http.MethodDelete, "/volumes/vol1", http.NoBody)
resp := httptest.NewRecorder()
err := v.deleteVolumes(ctx, resp, req, map[string]string{"name": "vol1"})
@@ -455,7 +455,7 @@ func TestVolumeRemoveSwarm(t *testing.T) {
}
ctx := context.WithValue(context.Background(), httputils.APIVersionKey{}, clusterVolumesVersion)
req := httptest.NewRequest(http.MethodDelete, "/volumes/vol1", nil)
req := httptest.NewRequest(http.MethodDelete, "/volumes/vol1", http.NoBody)
resp := httptest.NewRecorder()
err := v.deleteVolumes(ctx, resp, req, map[string]string{"name": "vol1"})
@@ -472,7 +472,7 @@ func TestVolumeRemoveNotFoundNoSwarm(t *testing.T) {
}
ctx := context.WithValue(context.Background(), httputils.APIVersionKey{}, clusterVolumesVersion)
req := httptest.NewRequest(http.MethodDelete, "/volumes/vol1", nil)
req := httptest.NewRequest(http.MethodDelete, "/volumes/vol1", http.NoBody)
resp := httptest.NewRecorder()
err := v.deleteVolumes(ctx, resp, req, map[string]string{"name": "vol1"})
@@ -489,7 +489,7 @@ func TestVolumeRemoveNotFoundNoManager(t *testing.T) {
}
ctx := context.WithValue(context.Background(), httputils.APIVersionKey{}, clusterVolumesVersion)
req := httptest.NewRequest(http.MethodDelete, "/volumes/vol1", nil)
req := httptest.NewRequest(http.MethodDelete, "/volumes/vol1", http.NoBody)
resp := httptest.NewRecorder()
err := v.deleteVolumes(ctx, resp, req, map[string]string{"name": "vol1"})
@@ -513,7 +513,7 @@ func TestVolumeRemoveFoundNoSwarm(t *testing.T) {
}
ctx := context.WithValue(context.Background(), httputils.APIVersionKey{}, clusterVolumesVersion)
req := httptest.NewRequest(http.MethodDelete, "/volumes/vol1", nil)
req := httptest.NewRequest(http.MethodDelete, "/volumes/vol1", http.NoBody)
resp := httptest.NewRecorder()
err := v.deleteVolumes(ctx, resp, req, map[string]string{"name": "vol1"})
@@ -536,7 +536,7 @@ func TestVolumeRemoveNoSwarmInUse(t *testing.T) {
}
ctx := context.WithValue(context.Background(), httputils.APIVersionKey{}, clusterVolumesVersion)
req := httptest.NewRequest(http.MethodDelete, "/volumes/inuse", nil)
req := httptest.NewRequest(http.MethodDelete, "/volumes/inuse", http.NoBody)
resp := httptest.NewRecorder()
err := v.deleteVolumes(ctx, resp, req, map[string]string{"name": "inuse"})
@@ -564,7 +564,7 @@ func TestVolumeRemoveSwarmForce(t *testing.T) {
}
ctx := context.WithValue(context.Background(), httputils.APIVersionKey{}, clusterVolumesVersion)
req := httptest.NewRequest(http.MethodDelete, "/volumes/vol1", nil)
req := httptest.NewRequest(http.MethodDelete, "/volumes/vol1", http.NoBody)
resp := httptest.NewRecorder()
err := v.deleteVolumes(ctx, resp, req, map[string]string{"name": "vol1"})
@@ -573,7 +573,7 @@ func TestVolumeRemoveSwarmForce(t *testing.T) {
assert.Assert(t, cerrdefs.IsConflict(err))
ctx = context.WithValue(context.Background(), httputils.APIVersionKey{}, clusterVolumesVersion)
req = httptest.NewRequest(http.MethodDelete, "/volumes/vol1?force=1", nil)
req = httptest.NewRequest(http.MethodDelete, "/volumes/vol1?force=1", http.NoBody)
resp = httptest.NewRecorder()
err = v.deleteVolumes(ctx, resp, req, map[string]string{"name": "vol1"})

View File

@@ -1,4 +1,4 @@
package server // import "github.com/docker/docker/api/server"
package server
import (
"context"

View File

@@ -1,4 +1,4 @@
package server // import "github.com/docker/docker/api/server"
package server
import (
"context"
@@ -21,7 +21,7 @@ func TestMiddlewares(t *testing.T) {
}
srv.UseMiddleware(*m)
req, _ := http.NewRequest(http.MethodGet, "/containers/json", nil)
req, _ := http.NewRequest(http.MethodGet, "/containers/json", http.NoBody)
resp := httptest.NewRecorder()
ctx := context.Background()

View File

@@ -19,10 +19,10 @@ produces:
consumes:
- "application/json"
- "text/plain"
basePath: "/v1.50"
basePath: "/v1.51"
info:
title: "Docker Engine API"
version: "1.50"
version: "1.51"
x-logo:
url: "https://docs.docker.com/assets/images/logo-docker-main.png"
description: |
@@ -56,7 +56,7 @@ info:
is returned.
If you omit the version-prefix, the current version of the API (v1.50) is used.
For example, calling `/info` is the same as calling `/v1.50/info`. Using the
For example, calling `/info` is the same as calling `/v1.51/info`. Using the
API without a version-prefix is deprecated and will be removed in a future release.
Engine releases in the near future should support this version of the API,
@@ -2196,8 +2196,7 @@ definitions:
Number of containers using this image. Includes both stopped and running
containers.
This size is not calculated by default, and depends on which API endpoint
is used. `-1` indicates that the value has not been set / calculated.
`-1` indicates that the value has not been set / calculated.
x-nullable: false
type: "integer"
example: 2
@@ -5863,7 +5862,7 @@ definitions:
type: "integer"
format: "uint64"
x-nullable: true
example: 18446744073709551615
example: "18446744073709551615"
ContainerThrottlingData:
description: |

View File

@@ -1,4 +1,4 @@
package {{ .Package }} // import "github.com/docker/docker/api/types/{{ .Package }}"
package {{ .Package }}
// ----------------------------------------------------------------------------
// Code generated by `swagger generate operation`. DO NOT EDIT.

View File

@@ -1,5 +1,5 @@
// Package backend includes types to send information to server backends.
package backend // import "github.com/docker/docker/api/types/backend"
package backend
import (
"io"

View File

@@ -1,4 +1,4 @@
package backend // import "github.com/docker/docker/api/types/backend"
package backend
import (
"io"

View File

@@ -1,4 +1,4 @@
package blkiodev // import "github.com/docker/docker/api/types/blkiodev"
package blkiodev
import "fmt"

View File

@@ -1,4 +1,4 @@
package types // import "github.com/docker/docker/api/types"
package types
import (
"bufio"

View File

@@ -1,4 +1,4 @@
package container // import "github.com/docker/docker/api/types/container"
package container
import (
"time"

View File

@@ -18,11 +18,13 @@ type ExecOptions struct {
AttachStdin bool // Attach the standard input, makes possible user interaction
AttachStderr bool // Attach the standard error
AttachStdout bool // Attach the standard output
Detach bool // Execute in detach mode
DetachKeys string // Escape keys for detach
Env []string // Environment variables
WorkingDir string // Working directory
Cmd []string // Execution commands and args
// Deprecated: the Detach field is not used, and will be removed in a future release.
Detach bool
}
// ExecStartOptions is a temp struct used by execStart

View File

@@ -1,4 +1,4 @@
package container // import "github.com/docker/docker/api/types/container"
package container
import (
"errors"

View File

@@ -1,6 +1,6 @@
//go:build !windows
package container // import "github.com/docker/docker/api/types/container"
package container
import "github.com/docker/docker/api/types/network"

View File

@@ -1,4 +1,4 @@
package container // import "github.com/docker/docker/api/types/container"
package container
import "github.com/docker/docker/api/types/network"

View File

@@ -1,4 +1,4 @@
package container // import "github.com/docker/docker/api/types/container"
package container
// WaitCondition is a type used to specify a container state for which
// to wait.

View File

@@ -1,4 +1,5 @@
package events // import "github.com/docker/docker/api/types/events"
package events
import "github.com/docker/docker/api/types/filters"
// Type is used for event-types.
@@ -111,11 +112,14 @@ type Actor struct {
// Message represents the information an event contains
type Message struct {
// Deprecated information from JSONMessage.
// Deprecated: use Action instead.
// Information from JSONMessage.
// With data only in container events.
Status string `json:"status,omitempty"` // Deprecated: use Action instead.
ID string `json:"id,omitempty"` // Deprecated: use Actor.ID instead.
From string `json:"from,omitempty"` // Deprecated: use Actor.Attributes["image"] instead.
Status string `json:"status,omitempty"`
// Deprecated: use Actor.ID instead.
ID string `json:"id,omitempty"`
// Deprecated: use Actor.Attributes["image"] instead.
From string `json:"from,omitempty"`
Type Type
Action Action

View File

@@ -1,4 +1,5 @@
package filters // import "github.com/docker/docker/api/types/filters"
package filters
import "fmt"
func ExampleArgs_MatchKVList() {

View File

@@ -2,7 +2,7 @@
Package filters provides tools for encoding a mapping of keys to a set of
multiple values.
*/
package filters // import "github.com/docker/docker/api/types/filters"
package filters
import (
"encoding/json"

View File

@@ -1,4 +1,4 @@
package filters // import "github.com/docker/docker/api/types/filters"
package filters
import (
"encoding/json"

View File

@@ -1,4 +1,4 @@
package image // import "github.com/docker/docker/api/types/image"
package image
// ----------------------------------------------------------------------------
// Code generated by `swagger generate operation`. DO NOT EDIT.

View File

@@ -75,6 +75,8 @@ type ListOptions struct {
SharedSize bool
// ContainerCount indicates whether container count should be computed.
//
// Deprecated: This field has been unused and is no longer required and will be removed in a future version.
ContainerCount bool
// Manifests indicates whether the image manifests should be returned.

Some files were not shown because too many files have changed in this diff Show More