Commit Graph

52878 Commits

Author SHA1 Message Date
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
Sebastiaan van Stijn
0a30b98447 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>
2025-06-12 10:21:43 +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
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