Commit Graph

55191 Commits

Author SHA1 Message Date
Rob Murray
a2de9bb334 Unmap more netip.Addr vars created using AddrFromSlice
Signed-off-by: Rob Murray <rob.murray@docker.com>
2025-11-24 16:51:14 +00:00
Rob Murray
9907ded7df Merge pull request #51577 from robmry/static-ip-no-configured-subnet
Allow configured address with no configured subnet
2025-11-24 16:37:27 +00:00
Rob Murray
2effc1bfd4 inspect: unmap IPv6-mapped IPv4 host address
Signed-off-by: Rob Murray <rob.murray@docker.com>
2025-11-24 16:29:32 +00:00
Rob Murray
84a251d039 Allow configured address with no configured subnet
Signed-off-by: Rob Murray <rob.murray@docker.com>
2025-11-24 14:14:27 +00:00
Rob Murray
7e14b4d931 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>
2025-11-24 14:14:00 +00:00
Cory Snider
517ae20be8 .github: collect all the OTEL traces
Jaeger does not make it easy to dump all the collected trace spans from
all services at once. Switch to using the OpenTelemetry Collector with
the OTLP File exporter which writes the traces straight to disk in a
format that Jaeger UI can natively consume.

Signed-off-by: Cory Snider <csnider@mirantis.com>
2025-11-21 18:12:25 -05:00
Brian Goff
6e52828ec3 Merge pull request #51517 from corhere/opencensus-bridge
daemon: install OpenCensus-to-OTEL trace bridge
2025-11-20 11:07:51 -08:00
Paweł Gronowski
45169d5784 Merge pull request #51571 from tonistiigi/update-buildkit-v0.26.2
vendor: update buildkit to v0.26.2
2025-11-20 16:22:10 +00:00
Tonis Tiigi
54d269a3b4 vendor: update buildkit to v0.26.2
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2025-11-20 13:27:49 +00:00
2003Aditya
442f0115cd docs: update contributing guides for clarity and consistency (#49891)
Signed-off-by: Aditya Mishra <mishraaditya675@gmail.com>
2025-11-20 18:03:02 +05:30
Aditya Mishra
93825e00e8 migrate TestAPIImagesSaveAndLoad to integration test
Signed-off-by: Aditya Mishra <mishraaditya675@gmail.com>
2025-11-20 17:39:10 +05:30
Sebastiaan van Stijn
814cc31ff3 Merge pull request #51557 from robmry/replace_lock_in_remote_nw_driver
Remote nw driver: restore missing nwEndpointsMu.Lock
2025-11-19 16:35:48 +00:00
Rob Murray
ed10b98506 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>
2025-11-18 15:38:48 +00:00
Sebastiaan van Stijn
c36b8ddd57 Merge pull request #51550 from 2003Aditya/TestAPIGetEnabledCORS
integration: migrate TestAPIGetEnabledCORS to integration test
2025-11-18 13:25:10 +00:00
Aditya Mishra
9fbc9d6e6d integration: migrate TestAPIGetEnabledCORS to integration test
Signed-off-by: Aditya Mishra <mishraaditya675@gmail.com>
2025-11-18 12:20:20 +05:30
Paweł Gronowski
41ff290929 Merge pull request #51551 from tonistiigi/update-buildkit-v0.26.1
vendor: update buildkit to v0.26.1
docker-v29.1.0-rc.1
2025-11-17 17:28:30 +00:00
Paweł Gronowski
33e967575d Merge pull request #51549 from thaJeztah/rm_TestVolumeCLINoArgs
integration-cli: remove TestVolumeCLINoArgs
2025-11-17 17:03:43 +00:00
Paweł Gronowski
931784650d Merge pull request #51533 from thaJeztah/client_refactor_negotiate
client: simplify logic for manual vs auto API versions
2025-11-17 16:39:11 +00:00
Tonis Tiigi
774bb532f1 vendor: update buildkit to v0.26.1
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2025-11-17 16:16:43 +00:00
Paweł Gronowski
46e28a284a Merge pull request #51539 from thaJeztah/fix_content_type
client: Client.buildRequest: fix content-type handling
2025-11-17 16:14:49 +00:00
Sebastiaan van Stijn
237446a25d Merge pull request #51548 from thaJeztah/improve_TestTLSCloseWriter
client: TestTLSCloseWriter: assorted cleanups / fixes
2025-11-17 11:17:22 +01:00
Sebastiaan van Stijn
e59d1b4563 libnetwork/drivers/overlay: DiscoverNew: move logic to setKeys, updateKeys
Make the DiscoverNew switch only responsible for asserting the correct
data type, and push the conversion logic into the setKeys and updateKeys
methods.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-11-16 23:36:04 +01:00
Sebastiaan van Stijn
f40b45ca1f libnetwork/drivers/overlay: use structured logs in some places
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-11-16 23:36:04 +01:00
Sebastiaan van Stijn
c9f0314f21 libnetwork: controller.handleKeyChange: slight cleanup of logs
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-11-16 23:36:03 +01:00
Sebastiaan van Stijn
a03d6bd071 Merge pull request #51536 from locnnil/patch-1
Dockerfile: update cli to v29.0.1
2025-11-16 23:33:24 +01:00
Sebastiaan van Stijn
cf7cc93529 Merge pull request #51498 from 2003Aditya/TestAPIImagesDelete
Test api images delete
2025-11-16 23:04:06 +01:00
Sebastiaan van Stijn
029770595d integration-cli: remove TestVolumeCLINoArgs
This test was only testing behavior of the CLI itself (or even basic
functionality provided by Cobra).

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-11-16 21:21:56 +01:00
Sebastiaan van Stijn
9ab033cc8a client: TestTLSCloseWriter: assorted cleanups / fixes
- close idle connections after test
- don't discard failures to write upgrade response
- ignore errors in defer to make the linters happy

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-11-16 20:56:12 +01:00
Rob Murray
96b8f9c8ca Daemon.createContainerOSSpecificSettings - remove redundant param
Also:
- remove the hostConfig param from Daemon.createContainerVolumesOS.
- rename var container -> ctr

Signed-off-by: Rob Murray <rob.murray@docker.com>
2025-11-16 18:25:42 +00:00
Rob Murray
33032b0454 Daemon.setSecurityOptions: remove redundant param
Signed-off-by: Rob Murray <rob.murray@docker.com>
2025-11-16 18:25:06 +00:00
Rob Murray
34925e5be9 Remove Daemon.setHostConfig
The container's constructor, Daemon.newContainer, already has
hostConfig and can just assign it directly.

Signed-off-by: Rob Murray <rob.murray@docker.com>
2025-11-16 18:25:06 +00:00
Rob Murray
22c5c78bfb Move Daemon.registerMountPoints out of Daemon.setHostConfig
Call registerMountPoints after the rest of the container's
configuration has been set up.

This will make it possible to call an NRI plugin with the
container's config, allowing it to adjust the mounts in that
config, before it's used to find volumes etc.

Signed-off-by: Rob Murray <rob.murray@docker.com>
2025-11-16 18:25:06 +00:00
Rob Murray
48709e502f Split OS-specific container config and volume creation
Daemon.createContainerOSSpecificSettings adds container config for
the OS, and creates volumes. Split those two things.

This will make it possible to call an NRI plugin after the config
is complete, before volumes are created - so the NRI plugin can
adjust a full set of config, including volumes.

Signed-off-by: Rob Murray <rob.murray@docker.com>
2025-11-16 18:20:12 +00:00
Rob Murray
4434236088 Daemon.setHostConfig - don't set default network mode
It's set later in Daemon.create, setHostConfig's only caller.

Signed-off-by: Rob Murray <rob.murray@docker.com>
2025-11-16 18:20:12 +00:00
Rob Murray
e757bbb4ea Move call to Daemon.registerLinks out of Daemon.setHostConfig
The call from Daemon.create -> Daemon.setHostConfig acquired
container.Lock, but didn't need to because the container is
newly created and solely owned by the caller. The call from
Daemon.restore did not acquire the lock.

Signed-off-by: Rob Murray <rob.murray@docker.com>
2025-11-16 18:20:12 +00:00
Rob Murray
92b4902b8d Daemon.registerMountPoints: var 'container' -> 'ctr'
Signed-off-by: Rob Murray <rob.murray@docker.com>
2025-11-16 18:19:56 +00:00
Sebastiaan van Stijn
17552fc792 Merge pull request #51542 from robmry/rootless-noipv6
rootless: ignore error when enabling IPv6 forwarding
2025-11-16 14:20:19 +01:00
Rob Murray
5c9f2e0388 rootless: ignore error when enabling IPv6 forwarding
For hosts with IPv6 disabled.

Signed-off-by: Rob Murray <rob.murray@docker.com>
2025-11-16 11:51:14 +00:00
Sebastiaan van Stijn
4622dd0ccc client: Client.buildRequest, jsonEncode improve handling of content
- add early returns for `nil` body, `http.NoBody`, and `json.RawMessage`
- use `http.NoBody` instead of `nil` for empty bodies; it's more clear
  on intent.
- use json.Encode instead of json.Encoder.Encode(), as we're marshaling
  a single JSON document; this also avoid adding a trailing newline.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-11-15 00:39:59 +01:00
Sebastiaan van Stijn
20d65620f9 client: Client.buildRequest: don't set content-header if not set
This function was setting `text/plain` as default content-type for any
request that had a non-nil body.

However, this would also set the content-type if (e.g.) `http.NoBody` was set,
or if an empty reader was used, which would result in the daemon potentialy
rejecting the request, as it validates request to be using `application/json`;
d9ee22d1ab/daemon/server/httputils/httputils.go (L47-L58)

    === RUN   TestCommitInheritsEnv
        commit_test.go:30: assertion failed: error is not nil: Error response from daemon: unsupported Content-Type header (text/plain): must be 'application/json'
    --- FAIL: TestCommitInheritsEnv (0.02s)

This patch removes setting the default content-type.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-11-15 00:39:59 +01:00
Sebastiaan van Stijn
a81d441133 Merge pull request #51534 from robmry/dont-remove-removed-gateway
Don't try to remove a cleared docker_gwbridge endpoint
2025-11-15 00:32:32 +01:00
Lincoln Wallace
b17eee7aad Update DOCKERCLI_VERSION to v29.0.1
Signed-off-by: Lincoln Wallace <lincoln.wallace@canonical.com>
2025-11-14 16:38:36 -03:00
Sebastiaan van Stijn
4e2e2cde7e client: simplify logic for manual vs auto API versions
When manually setting the API version to use, automatic API version
negotiation should no longer be performed. Instead of keeping track
of these options individually, we can mark negotiation to have happend
if either the version was set manually, or if API version negotiation
took place.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-11-14 20:30:49 +01:00
Sebastiaan van Stijn
d9ee22d1ab Merge pull request #51530 from thaJeztah/allow_renegotiate
client: client.Ping: allow ForceNegotiate with manual override
2025-11-14 20:07:27 +01:00
Rob Murray
1731e9e729 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>
2025-11-14 17:41:01 +00:00
Sebastiaan van Stijn
f156a683b0 Merge pull request #51527 from thaJeztah/validate_versions
client: improve validation and handling of WithAPIVersion, WithAPIVersionFromEnv
2025-11-14 18:17:13 +01:00
Sebastiaan van Stijn
6857132911 client: client.Ping: allow ForceNegotiate with manual override
While a manual overridden version shouldn't perform automatic version
negotiation, the "ForceNegotiate" option could still be used to (re)
negotiate a version. This allows a client to be configured with an
initial API version, then triggered to perform API-version negotiation.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-11-14 17:41:56 +01:00
Sebastiaan van Stijn
c1e217d18d Merge pull request #51529 from thaJeztah/skip_TestBuildWithHugeFile
integration: skip TestBuildWithHugeFile
2025-11-14 17:35:48 +01:00
Akihiro Suda
57e8ef9d30 Merge pull request #51484 from thaJeztah/vendor_oci_cgroups
vendor: github.com/opencontainers/cgroups v0.0.6
2025-11-14 11:32:06 -05:00
Aditya Mishra
8f1134b46d integration/image: migrate TestAPIImagesDelete to the new integration test framework
Migrated TestAPIImagesDelete from the legacy integration-cli suite
(docker_api_images_test.go) to the new integration test framework under
integration/image/remove_test.go.

This update:
- Fixes ENV instruction syntax to use "ENV FOO=bar"
- Adds error type check using errdefs.IsNotFound for cleaner assertions
- Ensures consistent cleanup handling

Signed-off-by: Aditya Mishra <mishraaditya675@gmail.com>
2025-11-14 22:00:15 +05:30