Commit Graph

55425 Commits

Author SHA1 Message Date
Sebastiaan van Stijn
2c533f9327 vendor: github.com/containerd/cgroup/v3 v3.1.2
- hugetlb: correctly parse hugetlb.<size>.events files
- go.mod: github.com/opencontainers/runtime-spec v1.3.0

full diff: https://github.com/containerd/cgroups/compare/v3.1.0...v3.1.2

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-12-18 19:55:58 +01:00
Sebastiaan van Stijn
4b4223a8d4 vendor: github.com/opencontainers/runtime-spec v1.3.0
This includes a breaking change in pids.Limit changing to a pointer.

full diff: https://github.com/opencontainers/runtime-spec/compare/v1.2.1...v1.3.0

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-12-18 19:55:56 +01:00
Paweł Gronowski
587d96c934 Merge pull request #51762 from thaJeztah/json_tag
api/types/swarm: ResourceRequirements.MemorySwappiness: fix json tag
2025-12-18 18:46:26 +00:00
Sebastiaan van Stijn
9ae239e654 golangci-lint: iface: ignore identical interfaces in client module
These interfaces in the client module are identical by design to allow
future expansion.

    client/container_export.go:15:6: identical: interface 'ContainerExportResult' contains identical methods or type constraints with another interface, causing redundancy (see: ContainerLogsResult, ImageImportResult, ImageLoadResult, ImageSaveResult, ServiceLogsResult, TaskLogsResult) (iface)
    type ContainerExportResult interface {
         ^
    client/container_logs.go:26:6: identical: interface 'ContainerLogsResult' contains identical methods or type constraints with another interface, causing redundancy (see: ContainerExportResult, ImageImportResult, ImageLoadResult, ImageSaveResult, ServiceLogsResult, TaskLogsResult) (iface)
    type ContainerLogsResult interface {
         ^
    client/image_import.go:12:6: identical: interface 'ImageImportResult' contains identical methods or type constraints with another interface, causing redundancy (see: ContainerExportResult, ContainerLogsResult, ImageLoadResult, ImageSaveResult, ServiceLogsResult, TaskLogsResult) (iface)
    type ImageImportResult interface {
         ^
    client/image_load.go:12:6: identical: interface 'ImageLoadResult' contains identical methods or type constraints with another interface, causing redundancy (see: ContainerExportResult, ContainerLogsResult, ImageImportResult, ImageSaveResult, ServiceLogsResult, TaskLogsResult) (iface)
    type ImageLoadResult interface {
         ^
    client/image_pull.go:17:6: identical: interface 'ImagePullResponse' contains identical methods or type constraints with another interface, causing redundancy (see: ImagePushResponse) (iface)
    type ImagePullResponse interface {
         ^
    client/image_push.go:20:6: identical: interface 'ImagePushResponse' contains identical methods or type constraints with another interface, causing redundancy (see: ImagePullResponse) (iface)
    type ImagePushResponse interface {
         ^
    client/image_save.go:9:6: identical: interface 'ImageSaveResult' contains identical methods or type constraints with another interface, causing redundancy (see: ContainerExportResult, ContainerLogsResult, ImageImportResult, ImageLoadResult, ServiceLogsResult, TaskLogsResult) (iface)
    type ImageSaveResult interface {
         ^
    client/service_logs.go:28:6: identical: interface 'ServiceLogsResult' contains identical methods or type constraints with another interface, causing redundancy (see: ContainerExportResult, ContainerLogsResult, ImageImportResult, ImageLoadResult, ImageSaveResult, TaskLogsResult) (iface)
    type ServiceLogsResult interface {
         ^
    client/task_logs.go:26:6: identical: interface 'TaskLogsResult' contains identical methods or type constraints with another interface, causing redundancy (see: ContainerExportResult, ContainerLogsResult, ImageImportResult, ImageLoadResult, ImageSaveResult, ServiceLogsResult) (iface)
    type TaskLogsResult interface {
         ^

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-12-18 17:11:24 +01:00
Sebastiaan van Stijn
7b74376ff1 client: testRoundTripper: remove unused skipConfigureTransport method
This was added in a315437e1c, likely because
I tried to do some interface matching, but currently it doesn't look to
be implementing one, so we can remove it.

    client/client_options.go:136:25: func testRoundTripper.skipConfigureTransport is unused (unused)
    func (testRoundTripper) skipConfigureTransport() bool { return true }
                            ^

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-12-18 17:11:23 +01:00
Sebastiaan van Stijn
34ee29ceaa client: use errors.New (revive)
client/container_exec_test.go:152:19: use-errors-new: replace fmt.Errorf by errors.New (revive)
                            return nil, fmt.Errorf("should not have made API request")
                                        ^

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-12-18 17:11:23 +01:00
Sebastiaan van Stijn
e254a9f0f1 client: containerDiskUsageFromLegacyAPI: make switch exhaustive
client/system_disk_usage.go:275:3: missing cases in switch of type container.ContainerState: container.StateCreated, container.StateRemoving, container.StateExited, container.StateDead (exhaustive)
            switch c.State {
            ^

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-12-18 17:11:23 +01:00
Sebastiaan van Stijn
f39912a30e client: fix some missing error checks in tests (ineffassign)
client/client_test.go:367:5: ineffectual assignment to err (ineffassign)
        _, err = client.Ping(t.Context(), PingOptions{
           ^
    client/client_test.go:381:5: ineffectual assignment to err (ineffassign)
        _, err = client.Ping(t.Context(), PingOptions{
           ^
    client/client_test.go:425:5: ineffectual assignment to err (ineffassign)
        _, err = client.Ping(t.Context(), PingOptions{
           ^

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-12-18 17:11:15 +01:00
Sebastiaan van Stijn
8f3bfa3f34 client: fix missing import aliases (importas)
client/container_exec.go:8:2: import "github.com/containerd/errdefs" imported without alias but must be with alias "cerrdefs" according to config (importas)
        "github.com/containerd/errdefs"
        ^
    client/container_exec_test.go:9:2: import "github.com/containerd/errdefs" imported without alias but must be with alias "cerrdefs" according to config (importas)
        "github.com/containerd/errdefs"
        ^
    client/container_rename.go:8:2: import "github.com/containerd/errdefs" imported without alias but must be with alias "cerrdefs" according to config (importas)
        "github.com/containerd/errdefs"
        ^
    client/pkg/security/security_opts_test.go:8:2: import "gotest.tools/v3/assert/cmp" imported without alias but must be with alias "is" according to config (importas)
        "gotest.tools/v3/assert/cmp"
        ^
    client/volume_prune.go:9:2: import "github.com/containerd/errdefs" imported without alias but must be with alias "cerrdefs" according to config (importas)
        "github.com/containerd/errdefs"
        ^
    client/volume_prune_test.go:8:2: import "github.com/containerd/errdefs" imported without alias but must be with alias "cerrdefs" according to config (importas)
        "github.com/containerd/errdefs"
        ^
    client/container_exec_test.go:10:2: ST1019(related information): other import of "github.com/containerd/errdefs" (staticcheck)
        cerrdefs "github.com/containerd/errdefs"
        ^

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-12-18 15:27:34 +01:00
Sebastiaan van Stijn
0fd5cc134b api/types/jsonstream: Message: fix godoc
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-12-18 15:04:27 +01:00
Sebastiaan van Stijn
6c845ded18 api/types/swarm: ResourceRequirements.MemorySwappiness: fix json tag
types/swarm/task.go:151:2: structtag: struct field tag `json:MemorySwappiness,omitzero"` not compatible with reflect.StructTag.Get: bad syntax for struct tag value (govet)
        MemorySwappiness *int64 `json:MemorySwappiness,omitzero"`
        ^

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-12-18 15:03:13 +01:00
Sebastiaan van Stijn
faf002f421 Merge pull request #51751 from vvoland/replace-vendor
Re-add replace rules
2025-12-18 15:02:49 +01:00
Sebastiaan van Stijn
c9ca5187d0 Merge pull request #51759 from thaJeztah/bump_otel_contrib
vendor: go.opentelemetry.io/contrib/* v0.63.0
2025-12-18 14:00:18 +01:00
Sebastiaan van Stijn
03cc482cf7 Merge pull request #51757 from AkihiroSuda/rootlesskit
Dockerfile: update RootlessKit to v2.3.6
2025-12-18 12:01:56 +01:00
Sebastiaan van Stijn
8c0e404f6f vendor: go.opentelemetry.io/contrib/* v0.63.0
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-12-18 11:27:21 +01:00
Akihiro Suda
c88c8a6547 Dockerfile: update RootlessKit to v2.3.6
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2025-12-18 11:03:52 +09:00
Akihiro Suda
307bcec726 vendor: github.com/rootless-containers/rootlesskit/v2 v2.3.6
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2025-12-18 11:03:18 +09:00
Sebastiaan van Stijn
5315260521 Merge pull request #51752 from thaJeztah/rm_unused_makevars
Makefile: remove unused or outdated make-vars
2025-12-17 21:36:58 +01:00
Sebastiaan van Stijn
c6d2d697eb docs: remove mention of DOCKER_CLIENTONLY
This variable is no longer used since 9e7651db4d

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-12-17 18:07:08 +01:00
Sebastiaan van Stijn
81c170a696 Makefile: remove DOCKER_BUILD_GOGC
This option was added in 9672afa339 in 2016,
at which time tweaking GOGC showed a significant difference when building
the binary (`1m14.221s` vs `0m49.929s`).

Testing this Today doesn't show a real difference;

With GOGC=1000:

    rm -rf bundles/
    time hack/make.sh binary
    real	0m15.303s
    user	0m26.285s
    sys	0m6.383s

    real	0m4.931s
    user	0m3.103s
    sys	0m1.670s

    real	0m5.693s
    user	0m3.827s
    sys	0m2.384s

Without GOGC set;

    real	0m5.012s
    user	0m3.689s
    sys	0m1.549s

    real	0m5.298s
    user	0m3.997s
    sys	0m1.695s

    real	0m4.899s
    user	0m3.579s
    sys	0m1.423s

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-12-17 18:02:37 +01:00
Sebastiaan van Stijn
d5c81b1c01 Makefile: remove unused DOCKER_BUILD_PKGS
This option was added in 0bff2515f7 to control
what packages were built for the deb and rpm packages.

This repository no longer builds the deb and rpm packages, and this variable
is no longer used, so we can remove it.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-12-17 18:01:17 +01:00
Sebastiaan van Stijn
3a9a041092 Makefile: remove unused DOCKER_BUILD_OPTS
This option was added in e6d7df2e5d to allow
skipping copying the source code as part of `docker build` if a bind-mount
was used to improve the build performance.

This trick was replaced in 1c82d11908, which
now uses a separate target.

With the above, the `DOCKER_BUILD_OPTS` is no longer used, so we can remove it.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-12-17 17:44:05 +01:00
Paweł Gronowski
9dd2936e04 validate/module-replace: Also allow changing ref of the api module
Remove the `replace` rule check as it's not needed because it will also
pass the second check.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-12-17 16:41:26 +01:00
Paweł Gronowski
05f9988fc8 hack/vendor/dropreplace: Make the auto-ref pick more reliable
dropreplace now accepts an optional argument that allows to manually
specify a git ref to use for the modules.

It's not required though and if not present it will default to a master
branch from the upstream (preferred) or origin remote.

This is much more reliable than "module@master" which for some reason
tends to not resolve to the actual latest commit on the master branch.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-12-17 16:40:38 +01:00
Paweł Gronowski
354abbcb92 hack/vendor: Allow to specify ref to dropreplace
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-12-17 16:40:38 +01:00
Paweł Gronowski
4b9e56156d Re-add replace rules
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-12-17 16:34:13 +01:00
Paweł Gronowski
97a43d8537 Merge pull request #51749 from vvoland/vendor-client
vendor: github.com/moby/moby/client v0.2.2-rc.1
docker-v29.2.0-rc.1
2025-12-17 15:31:15 +00:00
Sebastiaan van Stijn
32190e99a3 Merge pull request #51624 from AkihiroSuda/fix-51601
cdi: read XDG_CONFIG_HOME/cdi and XDG_RUNTIME_DIR/cdi for rootless
2025-12-17 16:27:13 +01:00
Paweł Gronowski
1acc9d3739 vendor: github.com/moby/moby/client v0.2.2-rc.1
full diff: https://github.com/moby/moby/client/compare/b59b571efe73...api/v0.2.2-rc.1

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-12-17 16:21:11 +01:00
Paweł Gronowski
14747f2eaa Merge pull request #51748 from vvoland/vendor-api
vendor: github.com/moby/moby/api v1.53.0-rc.1
client/v0.2.2-rc.1
2025-12-17 15:12:49 +00:00
Paweł Gronowski
3cee1aad22 vendor: github.com/moby/moby/api v1.53.0-rc.1
full diff: https://github.com/moby/moby/api/compare/8b3dd2d280d7...v1.53.0-rc.1

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-12-17 16:05:16 +01:00
Paweł Gronowski
091494cc43 Merge pull request #51738 from vvoland/drop-replace
Drop replace rules
api/v1.53.0-rc.1
2025-12-17 14:58:41 +00:00
Paweł Gronowski
5070ad8dc1 Drop replace rules
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-12-17 15:45:55 +01:00
Paweł Gronowski
8b3dd2d280 Merge pull request #51743 from vvoland/validate-modulereplace-allowremovingreplace
validate/module-replace: Ignore client diff if it only removes the replace rule
2025-12-17 14:14:49 +00:00
Paweł Gronowski
b59b571efe Merge pull request #51746 from thaJeztah/fix_linting
daemon/libnetwork/options: GenerateFromModel: remove redundant check
2025-12-17 14:04:36 +00:00
Sebastiaan van Stijn
614d9b966f daemon/libnetwork/options: GenerateFromModel: remove redundant check
This check was added in 14c5cd377d to prevent
passing `nil` as type (`GenerateFromModel[nil](....)`), however, `nil` is not
a type, so trying to do so won't compile. Even if it would, it would be
theoretical at best, so let's just remove it.

fix linting:

    daemon/libnetwork/options/options.go:57:13: SA4023(related information): the lhs of the comparison is the 1st return value of this function call (staticcheck)
        modType := reflect.TypeFor[T]()
                   ^
    daemon/libnetwork/options/options.go:58:5: SA4023: this comparison is never true (staticcheck)
        if modType == nil {
           ^

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-12-17 14:19:53 +01:00
Paweł Gronowski
87da1c2fee Merge pull request #51745 from thaJeztah/api_go_version
api: update to go1.25.5 and remove version from Makefile
2025-12-17 12:40:07 +00:00
Sebastiaan van Stijn
e9dec9893f Merge pull request #51715 from jschfflr/45939-init-layer-cleanup
layer: Clean up init layer if initialization fails
2025-12-17 13:05:50 +01:00
Sebastiaan van Stijn
9c68897c6a Merge pull request #51668 from ndeloof/jsonl
use mime-type application/jsonl to align with openapi 3.2
2025-12-17 13:03:15 +01:00
Sebastiaan van Stijn
e1fb5ef4a7 api: update to go1.25.5 and remove version from Makefile
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-12-17 12:57:11 +01:00
Paweł Gronowski
265bdc1a06 validate/module-replace: Ignore client diff if it only removes the replace rule
The check is supposed to detect if we're missing replace rules (mostly
for the actual code changes).

When dropping the replace rules we're also updating the client/go.mod to
use the yet-untagged `api` module version (but that's ok).

For context, an example client diff for a commit that drops replace
rules is:

```diff
index d032891256..04cb6f3bee 100644
--- client/go.mod
+++ client/go.mod
@@ -10,7 +10,7 @@ require (
        github.com/docker/go-connections v0.6.0
        github.com/docker/go-units v0.5.0
        github.com/google/go-cmp v0.7.0
-       github.com/moby/moby/api v1.52.0
+       github.com/moby/moby/api v1.52.1-0.20251216183007-8316b79e045e
        github.com/moby/term v0.5.2
        github.com/opencontainers/go-digest v1.0.0
        github.com/opencontainers/image-spec v1.1.1
@@ -32,5 +32,3 @@ require (
        go.opentelemetry.io/otel/metric v1.35.0 // indirect
        golang.org/x/sys v0.33.0 // indirect
 )
-
-replace github.com/moby/moby/api => ../api
diff --git client/go.sum client/go.sum
index 29b5ea6130..558c150354 100644
--- client/go.sum
+++ client/go.sum
@@ -29,6 +29,8 @@ github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
 github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
 github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0=
 github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo=
+github.com/moby/moby/api v1.52.1-0.20251216183007-8316b79e045e h1:OU/YmCsRJtfx4OhTt7DD8WANQ57eHSUkYrGFNnS5yxc=
+github.com/moby/moby/api v1.52.1-0.20251216183007-8316b79e045e/go.mod h1:8mb+ReTlisw4pS6BRzCMts5M49W5M7bKt1cJy/YbAqc=
 github.com/moby/term v0.5.2 h1:6qk3FJAFDs6i/q3W/pQ97SX192qKfZgGjCQqfCJkgzQ=
 github.com/moby/term v0.5.2/go.mod h1:d3djjFCrjnB+fl8NJux+EJzu0msscUP+f8it8hPkFLc=
 github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U=' ']'
```

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-12-17 12:27:59 +01:00
Nicolas De Loof
aef5d996ce use mime-type application/jsonl to align with openapi 3.2
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-12-17 11:37:48 +01:00
Paweł Gronowski
26bb1af7e6 daemon/layer_store: Use named return error for defer
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-12-17 11:31:08 +01:00
Paweł Gronowski
b8093b76fb Merge pull request #51741 from austinvazquez/fix-branch-and-tags-doc
doc: fix module definition
2025-12-17 10:20:41 +00:00
Tõnis Tiigi
982b512951 Merge pull request #51740 from jsternberg/vendor-buildkit
vendor: github.com/moby/buildkit v0.26.3
2025-12-16 18:59:19 -08:00
Austin Vazquez
72ce2c3f82 doc: fix module definition
Signed-off-by: Austin Vazquez <austin.vazquez@docker.com>
2025-12-16 15:56:57 -06:00
Jonathan A. Sternberg
c63bf203bf vendor: github.com/moby/buildkit v0.26.3
Signed-off-by: Jonathan A. Sternberg <jonathan.sternberg@docker.com>
2025-12-16 14:21:57 -06:00
Paweł Gronowski
8316b79e04 Merge pull request #51735 from thaJeztah/bump_cobra
vendor: github.com/spf13/cobra v1.10.2
2025-12-16 18:30:07 +00:00
Paweł Gronowski
57658e4121 Merge pull request #51676 from thaJeztah/bump_golangci_lint
Dockerfile: update golangci-lint to v2.7.2
2025-12-16 16:03:59 +00:00
Sebastiaan van Stijn
1f532963ed golangci-lint: remove unused exclusion rule
WARN [runner/exclusion_rules] Skipped 0 issues by rules: [Text: "type name will be used as (container|volume)\\.(Container|Volume).* by other packages, and that stutters; consider calling this", Path: "api/types/(volume|container)/", Linters: "revive"]

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-12-16 16:55:33 +01:00