Commit Graph

54972 Commits

Author SHA1 Message Date
Paweł Gronowski
4612690e23 Merge pull request #51583 from vvoland/51577-docker-29.x
[docker-29.x backport] Allow configured address with no configured subnet
docker-v29.0.4
2025-11-24 18:44:28 +00:00
Rob Murray
6280a80f32 Allow configured address with no configured subnet
Signed-off-by: Rob Murray <rob.murray@docker.com>
(cherry picked from commit 84a251d039)
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-11-24 17:33:10 +01:00
Rob Murray
9cbafeac46 Update docker-py in test-docker-py
Pick up fixes for:
- test_create_with_ipv6_address
- test_connect_with_ipv6_address

65f7f0c..df3f8e2

Signed-off-by: Rob Murray <rob.murray@docker.com>
(cherry picked from commit 7e14b4d931)
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-11-24 17:33:07 +01:00
Sebastiaan van Stijn
1fa8a31556 Merge pull request #51558 from robmry/backport-29.x-replace_lock_in_remote_nw_driver
[docker-29.x backport] Restore missing nwEndpointsMu.Lock
docker-v29.0.3
2025-11-19 16:37:22 +00:00
Rob Murray
3c6e5f0f5a Restore missing nwEndpointsMu.Lock
- introduced by 4f7afb8 (Remove libnet's logic to track a driver's
  port mapping state)

Signed-off-by: Rob Murray <rob.murray@docker.com>
(cherry picked from commit ed10b98506)
Signed-off-by: Rob Murray <rob.murray@docker.com>
2025-11-18 16:02:30 +00:00
Sebastiaan van Stijn
e9ff10bf36 Merge pull request #51538 from thaJeztah/29.x_backport_dont-remove-removed-gateway
[docker-29.x backport] Don't try to remove cleared docker_gwbridge endpoint
docker-v29.0.2
2025-11-16 17:26:01 +01:00
Rob Murray
7faaa44e18 Don't try to remove cleared docker_gwbridge endpoint
If a container is using a docker_gwbridge endpoint as its gateway,
when it's connected to another network that provides a gateway, the
docker_gwbridge endpoint is removed when that endpoint is added (in
a recursive nightmare).

So, the "before" gateway for the container has been removed
before the new gateway is updateExternalConnectivity'd.

Don't pass the old gateway to updateExternalConnectivity in that
case, because the network driver's already forgotten about it.

Signed-off-by: Rob Murray <rob.murray@docker.com>
(cherry picked from commit 1731e9e729)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-11-16 15:16:49 +01:00
Rob Murray
e9f9d7a81e Merge pull request #51545 from thaJeztah/29.x_backport_skip_TestBuildWithHugeFile
[docker-29.x backport] integration: skip TestBuildWithHugeFile
2025-11-16 14:14:51 +00:00
Sebastiaan van Stijn
28665176e5 Merge pull request #51543 from robmry/backport-29.x/rootless-noipv6
[docker-29.x backport] rootless: ignore error when enabling IPv6 forwarding
2025-11-16 14:21:56 +01:00
Sebastiaan van Stijn
43f91f775a integration: skip TestBuildWithHugeFile
We've seen various failures recently where GitHub actions runners are
running out of space. Skip this test for now.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 3e4a3cb03e)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-11-16 14:18:27 +01:00
Rob Murray
bb0d79cb1a rootless: ignore error when enabling IPv6 forwarding
For hosts with IPv6 disabled.

Signed-off-by: Rob Murray <rob.murray@docker.com>
(cherry picked from commit 5c9f2e0388)
Signed-off-by: Rob Murray <rob.murray@docker.com>
2025-11-16 11:59:07 +00:00
Paweł Gronowski
198b5e3ed5 Merge pull request #51528 from akerouanton/backport-revendor-ishidawataru-sctp
[docker-29.x backport] Backport revendor ishidawataru sctp
docker-v29.0.1
2025-11-14 16:23:22 +01:00
Albin Kerouanton
2ad480ccf5 vendor: github.com/ishidawataru/sctp v0.0.0-20251114114122-1
full diff: 4b890084db..19ddcbc6aa

Signed-off-by: Albin Kerouanton <albin.kerouanton@docker.com>
2025-11-14 16:08:51 +01:00
Paweł Gronowski
cb6c1c3aca Merge pull request #51516 from vvoland/51492-docker-29.x
[docker-29.x backport] daemon: Fix image store choice priority for prior graphdriver state
2025-11-14 09:25:54 +01:00
Paweł Gronowski
2a18530fb2 Merge pull request #51513 from vvoland/51503-docker-29.x
[docker-29.x backport] hack/test/unit: Fix api and client module testing without replace rules
2025-11-14 09:25:21 +01:00
Paweł Gronowski
14c4e0d73a Merge pull request #51514 from vvoland/51493-docker-29.x
[docker-29.x backport] c8d/builder-next: Don't force unpack
2025-11-14 09:25:01 +01:00
Rob Murray
d23fd38f8b Merge pull request #51515 from vvoland/51495-docker-29.x
[docker-29.x backport] libnet: create DNS records on sbJoin (if not agent node)
2025-11-13 22:35:23 +00:00
Paweł Gronowski
3076530aa6 daemon: Fix image store choice priority for prior graphdriver state
The priority order for determining image store choice was incorrect when
a prior graphdriver existed.

The issue occurred because the prior graphdriver check happened after
processing explicit driver configuration, effectively ignoring user
intent when prior state existed.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
(cherry picked from commit 391247ce96)
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-11-13 20:44:49 +01:00
Paweł Gronowski
7a3cdd2c86 daemon: Add TestDetermineImageStoreChoice
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
(cherry picked from commit c5d0e3e6fa)
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-11-13 20:44:37 +01:00
Albin Kerouanton
d7b6f3a7d3 inte/networking: TestDisableIPv6OnInterface: add '-c1' to ping
If the DNS name still resolves to an IP address, and that address is
assigned to a running container, the ping command will run indefinitely
and the test suite will time out for 10 mins.

This is confusing, as it looks like a daemon hang, or a test suite hang,
whereas it's just a test failure. Add '-c1' to ping to make it return
immediately.

Signed-off-by: Albin Kerouanton <albin.kerouanton@docker.com>
(cherry picked from commit 53ea70ea46)
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-11-13 20:44:17 +01:00
Albin Kerouanton
7f5694cda1 inte/networking: test DNS resolution for non swarm-scoped nws
Previous commit reverted a faulty change that broke DNS resolution for
non swarm-scoped networks once a node has joined a Swarm cluster.

This commit adds an integration test to verify that we don't break DNS
resolution again.

Signed-off-by: Albin Kerouanton <albin.kerouanton@docker.com>
(cherry picked from commit 47bd247d4d)
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-11-13 20:44:16 +01:00
Albin Kerouanton
0e2d804e48 libnet: create DNS records on sbJoin (if not agent node)
Commit a8b9eff90 removed a call to Network.updateSvcRecord from
Network.createEndpoint on the grounds that:

> all callers of Network.createEndpoint follow up with an Endpoint.Join,
> which also sets up the DNS entry.

However, the original call in Network.createEndpoint was gated by:

```
if !n.getController().isSwarmNode() || n.Scope() != scope.Swarm || !n.driverIsMultihost() {
	n.updateSvcRecord(context.WithoutCancel(ctx), ep, true)
}
```

whereas the call in Endpoint.sbJoin() (invoked by Endpoint.Join()) is
gated by:

```
if !n.getController().isAgent() {
    if !n.getController().isSwarmNode() || n.Scope() != scope.Swarm || !n.driverIsMultihost() {
	    n.updateSvcRecord(context.WithoutCancel(ctx), ep, true)
    }
}
```

As a result, once a node has joined a Swarm cluster, no DNS entries are
created for non swarm-scoped networks.

Change the condition used by `sbJoin` to match the original condition
used in `createEndpoint`.

Signed-off-by: Albin Kerouanton <albin.kerouanton@docker.com>
(cherry picked from commit 2e41476a5f)
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-11-13 20:44:09 +01:00
Paweł Gronowski
7242ccd7a0 c8d/builder-next: Don't force unpack
The image exporter wrapper was unconditionally setting `unpack=true` for
all build exports, preventing users from controlling this behavior
through buildkit's output image exporter option.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
(cherry picked from commit b4f9bd1cb3)
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-11-13 20:43:42 +01:00
Paweł Gronowski
b6705d5e1a hack/test/unit: Fix api and client module testing without replace rules
Running sub-package tests from the root module without readding the
replace rules wasn't running the tests from the local in-tree versions
of these submodules.

Fix by cd-ing into their directories before running tests.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
(cherry picked from commit 0f597561e8)
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-11-13 20:42:58 +01:00
Paweł Gronowski
d105562bef Merge pull request #51466 from vvoland/vendor-client
vendor: github.com/moby/moby/client v0.1.0
docker-v29.0.0 v2.0.0-beta.3
2025-11-10 22:31:38 +01:00
Paweł Gronowski
20b831c59a vendor: github.com/moby/moby/client v0.1.0
full diff: https://github.com/moby/moby/client/compare/da8fb63a73c0...v0.1.0

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-11-10 22:05:24 +01:00
Paweł Gronowski
818ddd3b27 Merge pull request #51464 from vvoland/vendor-api
vendor: github.com/moby/moby/api v1.52.0
client/v0.1.0
2025-11-10 21:55:07 +01:00
Paweł Gronowski
e0a877b487 vendor: github.com/moby/moby/api v1.52.0
full diff: https://github.com/moby/moby/api/compare/da8fb63a73c0...v1.52.0

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-11-10 21:46:26 +01:00
Paweł Gronowski
1408c9ca4f Merge pull request #51462 from vvoland/drop-replace
Drop replace rules
api/v1.52.0
2025-11-10 20:16:43 +01:00
Paweł Gronowski
854ccbfcf5 Drop replace rules
Prepare v29.0.0

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-11-10 19:38:57 +01:00
Paweł Gronowski
c5e3c19bd3 Merge pull request #50942 from Vigilans/vigilans/buildkit-windows-isolation
daemon: Ensure buildkit created container's isolation mode is consistent with daemon's config in Windows
2025-11-10 19:33:43 +01:00
Paweł Gronowski
da8fb63a73 Merge pull request #51460 from thaJeztah/bump_go_version
client, api: update go.mod to go1.24
2025-11-10 19:03:46 +01:00
Sebastiaan van Stijn
15241265dc client, api: update go.mod to go1.24
While go1.23 still works, it's already EOL, so it may be a better
starting point to use that as minimum version for these modules, as
they're brand new.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-11-10 18:42:11 +01:00
Sebastiaan van Stijn
ed6d436d51 Merge pull request #51458 from thaJeztah/rm_deprecated_dockerversion
api/types/plugin: remove deprecated Config.DockerVersion
2025-11-10 18:28:56 +01:00
Sebastiaan van Stijn
591b4b003a Merge pull request #51457 from thaJeztah/rm_docker_docs_links
api/docs: remove links to docs.docker.com from changelog
2025-11-10 18:19:15 +01:00
Sebastiaan van Stijn
e8f156110a api/types/plugin: remove deprecated Config.DockerVersion
This was deprecated in c4fda95bea, and
already omitted.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-11-10 18:11:45 +01:00
Sebastiaan van Stijn
34fb9de7f3 api/docs: remove links to docs.docker.com from changelog
The docker documentation website may not be publishing rendered versions
of the swagger for deprecated API versions, so let's remove these links
from the changelog.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-11-10 18:04:01 +01:00
Vigilans
d192a63467 daemon: Ensure buildkit created container's isolation mode consistent with daemon's config
- Introduced DefaultIsolation method in the Daemon to return the daemon configured isolation mode for Windows.

Signed-off-by: Vigilans <vigilans@foxmail.com>
2025-11-10 16:33:14 +01:00
Paweł Gronowski
7cff366d43 Merge pull request #51439 from thaJeztah/concrete_enums
api/types/container: make ContainerState, HealthStatus concrete types
2025-11-10 16:21:22 +01:00
Paweł Gronowski
f57da07056 Merge pull request #51454 from thaJeztah/api_volumes_no_pointer
api/types/volume: change ListResponse.Volumes to a non-pointer slice
2025-11-10 16:20:16 +01:00
Sebastiaan van Stijn
db71c6a914 api/types/container: make HealthStatus a concrete type
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-11-10 16:08:15 +01:00
Sebastiaan van Stijn
1fd87e9fdf api/types/container: make ContainerState a concrete type
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-11-10 16:08:12 +01:00
Rob Murray
69c4524355 Merge pull request #51437 from thaJeztah/diskusage_move_legacy
api: remove / internalize LegacyDiskUsage
2025-11-10 15:03:37 +00:00
Paweł Gronowski
412a3a229d Merge pull request #51451 from thaJeztah/test_adjustments
assorted test-changes in preparation of updating integration-cli CLI version
2025-11-10 15:52:58 +01:00
Sebastiaan van Stijn
048ced8435 Merge pull request #51448 from akerouanton/stop-events-service
daemon: close EventsService on shutdown
2025-11-10 14:20:28 +01:00
Paweł Gronowski
75cf7c2544 Merge pull request #51450 from thaJeztah/checkpoint_client
client: checkpoint: add output structs and fix naming
2025-11-10 13:49:45 +01:00
Sebastiaan van Stijn
18000fe371 api/types/volume: change ListResponse.Volumes to a non-pointer slice
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-11-10 13:13:22 +01:00
Sebastiaan van Stijn
fe1a505cbf simplify some commit tests, and work around change in CLI behavior
These tests were failing because the "docker run" did not print the
ID of the container, and instead detached immediately without printing;

```
=== Failed
=== FAIL: amd64.integration-cli TestDockerCLICommitSuite/TestCommitAfterContainerIsDone (0.27s)
    docker_cli_commit_test.go:32: assertion failed:
        Command:  /usr/local/cli-integration/docker wait
        ExitCode: 1
        Error:    exit status 1
        Stdout:
        Stderr:   invalid container name or ID: value is empty

        Failures:
        ExitCode was 1 expected 0
        Expected no error
    --- FAIL: TestDockerCLICommitSuite/TestCommitAfterContainerIsDone (0.27s)

=== FAIL: amd64.integration-cli TestDockerCLICommitSuite/TestCommitWithoutPause (0.20s)
    docker_cli_commit_test.go:47: assertion failed:
        Command:  /usr/local/cli-integration/docker wait
        ExitCode: 1
        Error:    exit status 1
        Stdout:
        Stderr:   invalid container name or ID: value is empty

        Failures:
        ExitCode was 1 expected 0
        Expected no error
    --- FAIL: TestDockerCLICommitSuite/TestCommitWithoutPause (0.20s)
```

What happens is that it starts a container with only `stdin` attached, but
no `stdout`, and the behavior changed between versions of the CLI, which
may be either a bugfix or a regression;

docker 28 cli doesn't stay attached:

```bash
Status: Downloaded newer image for docker:28-cli
/ # docker run -i -a stdin busybox echo foo
/ #
```

docker 27 cli stays attached, but has the "three strikes, you're out" handling:

```bash
docker run -it --rm -v /var/run/docker.sock:/var/run/docker.sock docker:27-cli sh
Status: Downloaded newer image for docker:27-cli
/ # docker run -i -a stdin busybox echo foo
9dbb29080a72225593885bc4880d8f4f22f36803100179f9725468bda1d52b4f

^C^C^C
got 3 SIGTERM/SIGINTs, forcefully exiting
/ # ^C
```

docker 26 cli (and older) don't forward the signal to the container, and detach-keys don't work (or in this case, are handled by the CLI container)?:

```bash
docker run -it --rm -v /var/run/docker.sock:/var/run/docker.sock docker:26-cli sh
Status: Downloaded newer image for docker:26-cli
/ # docker run -i -a stdin busybox echo foo
21963ce1b9a7bb7eccef3618693b09a106fb29084b484e31c69cd4a26ee44777
^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C

<CTRL>p,q
```

As these tests were not testing that part, I simplified the tests, but
we should probably look into the change of behavior to see if it was
intentional (and if it was correct).

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-11-10 12:40:14 +01:00
Sebastiaan van Stijn
c477a68fb9 TestBuildForceRm: use assert to help debugging failures
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-11-10 12:40:13 +01:00
Sebastiaan van Stijn
b0ab0b4078 TestBridgeIPIsExcludedFromAllocatorPool: don't use deprecated fields
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-11-10 12:40:13 +01:00