Commit Graph

55292 Commits

Author SHA1 Message Date
Sebastiaan van Stijn
a11c3b9a89 Merge pull request #51684 from akerouanton/disallow-ctr-port-0
daemon: disallow container port 0
2025-12-11 14:07:59 +01:00
Sebastiaan van Stijn
2a191665b8 daemon/container: Container.BackfillEmptyPBs: prevent nil map
Make sure PortBindings is not a nil-map to match the behavior
we have when creating a container;
c64b781df2/daemon/internal/runconfig/config.go (L30-L47)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-12-11 12:09:32 +01:00
Albin Kerouanton
43780fe40c daemon: disallow container port 0
Signed-off-by: Albin Kerouanton <albin.kerouanton@docker.com>
2025-12-11 11:07:42 +01:00
Sebastiaan van Stijn
695010ba2e daemon: buildCreateEndpointOptions: fix panic with "publish all"
This code was added in 85b260fba8, but didn't
account for maps.Clone returning a `nil` map if the map cloned was `nil`.

This could lead to a panic, similar to the panic that was fixed in
7517464283d29969c4d3615397b369abd99ce395;

    panic: assignment to entry in nil map

    goroutine 498 [running]:

    github.com/moby/moby/v2/daemon.buildPortsRelatedCreateEndpointOptions(0x400042f348, 0xaaaabcc8f458?, 0x40006feb40)
        /root/build-deb/engine/daemon/network.go:1047 +0x844
    github.com/moby/moby/v2/daemon.buildCreateEndpointOptions(0x400042f348, 0x4001015040, 0x400027d320, 0x40006feb40, {0x0, 0x0, 0x4001506cb8?})
        /root/build-deb/engine/daemon/network.go:988 +0x20c
    github.com/moby/moby/v2/daemon.(*Daemon).connectToNetwork(0x4000898008, {0xaaaabe21d9f8, 0x4000f12b10}, 0x400089a008, 0x400042f348, {0x400077a9f0, 0x6}, 0x400027d320)
        /root/build-deb/engine/daemon/container_operations.go:738 +0x66c
    github.com/moby/moby/v2/daemon.(*Daemon).allocateNetwork(0x4000898008, {0xaaaabe21d9f8, 0x4000f12b10}, 0x400089a008, 0x400042f348)
        /root/build-deb/engine/daemon/container_operations.go:421 +0x298
    github.com/moby/moby/v2/daemon.(*Daemon).initializeCreatedTask(0x4000898008, {0xaaaabe21d9f8, 0x4000f12b10}, 0x400089a008, {0xaaaabe23dc60, 0x4000eb21c8}, 0x400042f348, 0xaaaabd4db3df?)
        /root/build-deb/engine/daemon/start_linux.go:37 +0x260
    github.com/moby/moby/v2/daemon.(*Daemon).containerStart(0x4000898008, {0xaaaabe21d9c0, 0xaaaabfa05300}, 0x400089a008, 0x400042f348, {0x0, 0x0}, {0x0, 0x0}, 0x1)
        /root/build-deb/engine/daemon/start.go:242 +0xba8
    github.com/moby/moby/v2/daemon.(*Daemon).restore.func4(0x400042f348, 0x400117f1f0)
        /root/build-deb/engine/daemon/daemon.go:633 +0x308
    created by github.com/moby/moby/v2/daemon.(*Daemon).restore in goroutine 1
        /root/build-deb/engine/daemon/daemon.go:607 +0x5ec

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-12-11 10:11:15 +01:00
Rob Murray
8cf9e64738 NRI: report container state to plugins
Signed-off-by: Rob Murray <rob.murray@docker.com>
2025-12-10 17:49:28 +00:00
Rob Murray
c64b781df2 Merge pull request #51678 from robmry/nri-review-comments
NRI: minor cleanups
2025-12-10 17:07:36 +00:00
Rob Murray
dc1fe0be82 NRI: minor cleanups
Address some post-merge review comments.

Signed-off-by: Rob Murray <rob.murray@docker.com>
2025-12-10 15:10:38 +00:00
Albin Kerouanton
07024223e2 Merge pull request #51674 from robmry/nri-env-vars
NRI: allow plugins to see/modify env vars
2025-12-10 15:52:42 +01:00
Sebastiaan van Stijn
186a5abedc Merge pull request #51664 from thaJeztah/integration_cli_updates
assorted test-changes in preparation of updating integration-cli CLI version
2025-12-10 13:21:56 +01:00
Rob Murray
322dda3908 NRI: add TestNRIContainerCreateEnvVarMod
Signed-off-by: Rob Murray <rob.murray@docker.com>
2025-12-10 10:30:49 +00:00
Rob Murray
b67f0c0449 NRI: add ContainerCreate hook, allow env-var adjustments
Signed-off-by: Rob Murray <rob.murray@docker.com>
2025-12-10 10:30:44 +00:00
Sebastiaan van Stijn
3a85f8df66 Merge pull request #51420 from AkihiroSuda/revert-5417
integration: increase timeout; gha/vm: update Lima to v2.0.2
2025-12-10 10:47:05 +01:00
Sebastiaan van Stijn
a7e55b9e4e Merge pull request #51625 from thaJeztah/less_reflect
libnetwork/options: GenerateFromModel: less reflection, and use generics
2025-12-10 01:58:03 +01:00
Sebastiaan van Stijn
565f7dce18 integration-cli: TestUserDefinedNetworkAlias: adjust for API versions
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-12-10 01:51:26 +01:00
Sebastiaan van Stijn
93eb7962dc integration-cli: TestUserDefinedNetworkAlias: replace deprecated utils
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-12-10 01:51:26 +01:00
Sebastiaan van Stijn
83f17f77cf integration-cli: adjust some tests for API-specific event-types
Image create events were added in API 1.46, and filtered out in older
API versions.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-12-10 01:51:26 +01:00
Sebastiaan van Stijn
35f1250685 integration-cli: use event-consts in some tests
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-12-10 01:51:23 +01:00
Sebastiaan van Stijn
33eb3b8d78 integration-cli: TestEventsFilterType: remove test for "build" events
Commit 6aea8c2591 updated this part of the
test to account for BuildKit now being used as default, which doesn't use
regular containers to "commit" to an image, and therefore doesn't produce
events as part of the build.

However, it changed it to filter for `build` type events, which .. don't
exist. The test passed because it only checked for number of events produced,
which is approximated by checking the number of lines in the output. In
this case, the output would be empty, so "events" was a slice of strings
with length 1; an empty string.

Given that BuildKit doesn't produce meaningful events to test for, we could
either disable BuildKit, to test the legacy builder, or just remove this
part of the test. Let's do the latter.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-12-10 01:50:45 +01:00
Sebastiaan van Stijn
99066209a2 libnetwork/options: GenerateFromModel: use generics
Use generics so that the produced output is already in the right
type.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-12-10 01:48:48 +01:00
Sebastiaan van Stijn
14c5cd377d libnetwork/options: GenerateFromModel: reduce reflection
Re-use some of the reflection results where possible.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-12-10 01:48:45 +01:00
Derek McGowan
d210449d85 Natively support GRPC on the docker socket
Use the GRPC server when requests are for the grpc content type.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-12-09 21:03:04 +01:00
Sebastiaan van Stijn
fcb23060fc integration-cli: rewrite some tests depending on intermediate images
These tests used intermediate images (as produced by the classic builder)
as part of the test. When using BuildKit, such images are not produced,
and will only be in the build-cache.

From the tests, it looks like the extra checks were not critical to
verify the behavior, so let's simplify them to not depend on this.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-12-09 17:04:49 +01:00
Sebastiaan van Stijn
751a6f9f33 integration-cli: improve TestBuildNoNamedVolume
Make sure the error is the one we expected, and slightly clarify
the behavior (named volumes not having a meaning in VOLUME, so will
be used as-is).

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-12-09 17:01:53 +01:00
Sebastiaan van Stijn
5152c7c3ef integration-cli: DockerCLIBuildSuite: use more unique names for images
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-12-09 17:00:21 +01:00
Sebastiaan van Stijn
a39e866aa8 integration-cli: rename var that shadowed package-level const
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-12-09 17:00:21 +01:00
Paweł Gronowski
6f98d758ed Merge pull request #51636 from robmry/nri-import
NRI: import and instantiate containerd's NRI adaptation package
2025-12-09 10:54:56 +00:00
Rob Murray
14906f8023 NRI: use the daemon's logger
Signed-off-by: Rob Murray <rob.murray@docker.com>
2025-12-08 16:12:09 +00:00
Rob Murray
282868dabf NRI: instantiate and start/stop NRI adaptation
Signed-off-by: Rob Murray <rob.murray@docker.com>
2025-12-08 16:11:59 +00:00
Rob Murray
4941b36883 NRI: import containerd's NRI adaptation package
Signed-off-by: Rob Murray <rob.murray@docker.com>
2025-12-08 16:09:31 +00:00
Rob Murray
08c30222ba Merge pull request #51634 from robmry/nri-config
NRI: add daemon.json/command line options
2025-12-08 16:08:59 +00:00
Paweł Gronowski
51f2a648e8 Merge pull request #51671 from thaJeztah/dedicated_license
api, client: add separate LICENSE file
2025-12-08 11:48:53 +00:00
Akihiro Suda
5ab4a14fe8 gha/vm: update Lima to v2.0.2
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2025-12-08 12:39:14 +09:00
Akihiro Suda
cc30833181 integration: increase timeout
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2025-12-08 12:39:14 +09:00
Sebastiaan van Stijn
8068dfb686 Merge pull request #51670 from Anga205/master
Fix spelling error in comments for names-generator.go
2025-12-05 21:38:29 +01:00
Rob Murray
1b99d36c4a Merge pull request #51564 from 2003Aditya/TestAPIImagesSizeCompatibility
integration: migrate TestAPIImagesSizeCompatibility to integration test
2025-12-05 16:26:18 +00:00
Rob Murray
a230544000 NRI: add daemon.json/command line options
Signed-off-by: Rob Murray <rob.murray@docker.com>
2025-12-05 15:19:33 +00:00
Sebastiaan van Stijn
29560eacda go.mod: add back replace rules
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-12-05 16:10:28 +01:00
Sebastiaan van Stijn
773aca9f5d api, client: add separate LICENSE file
In a multi-module repository, the top-level LICENSE file is used for
all modules in the repository. However, when using a "replace" rule,
the vendored file is removed, but added back when removing the replace
rule.

This patch adds copies of the license to each of the modules to reduce
code-churn; these are vanilla copies downloaded from;
https://www.apache.org/licenses/LICENSE-2.0.txt

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-12-05 15:57:55 +01:00
Angad Bhalla
bb713e7fa8 Fix spelling error in comments for names-generator.go
Corrected the spelling of 'Poincaré Prize' in comments.

Signed-off-by: Angad Bhalla <74541474+Anga205@users.noreply.github.com>
2025-12-05 20:17:56 +05:30
Sebastiaan van Stijn
06eadccf2f Merge pull request #51627 from kasium/tmpfs-mode
Improve description of tmpfs mode
2025-12-03 23:32:30 +01:00
Sebastiaan van Stijn
bac1877bca Merge pull request #51655 from kumy/patch-1
fix: Correct typo in error message
2025-12-03 23:31:00 +01:00
Austin Vazquez
0edbdcbc64 Merge pull request #51659 from thaJeztah/bump_devcontainer_tools
Dockerfile: update CLI to v29.1.2, compose v5.0.0
2025-12-03 14:00:39 -06:00
Cory Snider
3ac4fd1eba project: add End-of-maintenance date for 25.0
Signed-off-by: Cory Snider <csnider@mirantis.com>
2025-12-03 11:46:08 -05:00
Sebastiaan van Stijn
e874083bdb Dockerfile: update compose to v5.0.0
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-12-03 17:40:16 +01:00
Sebastiaan van Stijn
da1e638566 Dockerfile: update cli to v29.1.2
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-12-03 17:39:29 +01:00
kumy
b56d077034 fix: Correct typo in error message
Signed-off-by: kumy <kumy@users.noreply.github.com>
2025-12-03 13:13:46 +01:00
Sebastiaan van Stijn
19c48ee826 Merge pull request #51423 from thaJeztah/cleanup_token_errs
daemon/containerd: cleanup registry error-handling
2025-12-03 12:29:18 +01:00
Akihiro Suda
9e72c44dae rm -r hack/dockerfile/install
The directory was solely used by Dockerfile.simple.

For the "simple" mode, we can just directly apt-get the dependencies.

A part of issue 51637

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2025-12-03 18:33:55 +09:00
Sebastiaan van Stijn
de45c2ae4f Merge pull request #51648 from vvoland/update-go
update to go1.25.5
docker-v29.1.2
2025-12-02 21:58:47 +01:00
Sebastiaan van Stijn
4212eb0abf Merge pull request #51650 from thaJeztah/bump_actions
gha: update actions/checkout@v6, actions/upload-artifact@v5, actions/download-artifact@v6
2025-12-02 21:28:40 +01:00