Commit Graph

53857 Commits

Author SHA1 Message Date
Austin Vazquez
853aed171b api/types/image: move image option types to client
Signed-off-by: Austin Vazquez <austin.vazquez@docker.com>
2025-08-26 15:38:44 -05:00
Sebastiaan van Stijn
531be96bf9 Merge pull request #50800 from thaJeztah/rm_error_convert
daemon/containerd: remove convertError utility
2025-08-25 13:34:09 +02:00
Paweł Gronowski
f5df9eea84 Merge pull request #50796 from thaJeztah/sync_api_docs
api: docs: update v1.52 swagger with latest changes
2025-08-25 13:27:17 +02:00
Sebastiaan van Stijn
c5e75cc485 daemon/containerd: remove convertError utility
The containerd errors and related containerd/errdefs should now
be interchangeable with moby/errdefs, so there's no longer a need
to convert these errors.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-08-23 21:45:10 +02:00
Sebastiaan van Stijn
414e5f3b3d Merge pull request #50792 from thaJeztah/fix_email_deprecation
api/types/registry: update deprecation comment for AuthConfig.Email
2025-08-23 00:18:52 +02:00
Sebastiaan van Stijn
eed354379c api: docs: update v1.52 swagger with latest changes
follow-up to 48038347d7, which was
merged after the (not yet relased) v1.52 docs were created.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-08-23 00:05:19 +02:00
Sebastiaan van Stijn
41dd811926 Merge pull request #50795 from thaJeztah/bump_rootlesskit
update rootlesskit to v2.3.5
2025-08-22 23:27:49 +02:00
Sebastiaan van Stijn
b3a701a8a1 Merge pull request #50786 from austinvazquez/move-network-options-from-api-to-client
api/types/network: move network options from api to client
2025-08-22 23:19:31 +02:00
Sebastiaan van Stijn
0de3d2ec51 Dockerfile: update rootlesskit to v2.3.5
full diff: https://github.com/rootless-containers/rootlesskit/compare/v2.3.4...v2.3.5

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-08-22 21:32:31 +02:00
Sebastiaan van Stijn
70d096313f vendor: github.com/rootless-containers/rootlesskit/v2 v2.3.5
full diff: https://github.com/rootless-containers/rootlesskit/compare/v2.3.4...v2.3.5

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-08-22 21:31:10 +02:00
Sebastiaan van Stijn
aadb486522 Merge pull request #50727 from thaJeztah/frozen_trixie
Dockerfile: update debian frozen image to trixie-slim
2025-08-22 16:51:03 +02:00
Austin Vazquez
fe8516cf4b client: refactor InspectOptions to NetworkInspectOptions
Signed-off-by: Austin Vazquez <austin.vazquez@docker.com>
2025-08-22 09:38:53 -05:00
Austin Vazquez
5eaed0366c api/types/network: move InspectOptions to client mod
Signed-off-by: Austin Vazquez <austin.vazquez@docker.com>
2025-08-22 09:38:53 -05:00
Austin Vazquez
6084c6ae78 client: refactor ListOptions to NetworkListOptions
Signed-off-by: Austin Vazquez <austin.vazquez@docker.com>
2025-08-22 09:38:53 -05:00
Austin Vazquez
d6aa6ae9bd api/types/network: move ListOptions to client
Signed-off-by: Austin Vazquez <austin.vazquez@docker.com>
2025-08-22 09:38:47 -05:00
Sebastiaan van Stijn
d867f9f0f1 api/docs: update description for AuthConfig.Email field
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-08-22 14:19:13 +02:00
Sebastiaan van Stijn
6cfff7e880 api/types/registry: update deprecation comment for AuthConfig.Email
The Email field was originally used to create a new Docker Hub account
through the `docker login` command. The `docker login` command could be
used both to log in to an existing account (providing only username and
password), or to create a new account (providing desired username and
password, and an e-mail address to use for the new account).

This functionality was confusing, because it was implemented when Docker
Hub was the only registry, but the same functionality could not be used
for other registries. This functionality was removed in Docker 1.11 (API
version 1.23) through [moby@aee260d], which also removed the Email field
([engine-api@9a9e468]) as it was no longer used.

However, this caused issues when using a new CLI connecting with an old
daemon, as the field would no longer be serialized, and the deprecation
may not yet be picked up by custom registries, so [engine-api@167efc7]
added the field back, deprecated it, and added an "omitempty". There
was no official "deprecated" format yet at the time, so let's make sure
the deprecation follows the proper format to make sure it gets noticed.

[moby@aee260d]: aee260d4eb
[engine-api@9a9e468]: 9a9e468f50
[engine-api@167efc7]: 167efc72bb

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-08-22 14:18:19 +02:00
Paweł Gronowski
7d65b67668 Merge pull request #50783 from thaJeztah/bump_bbolt
vendor: go.etcd.io/bbolt v1.4.3
2025-08-22 14:06:04 +02:00
Paweł Gronowski
7c1ccb2c9a Merge pull request #50784 from thaJeztah/bump_x_sync
vendor: golang.org/x/sync v0.16.0
2025-08-22 14:05:48 +02:00
Sebastiaan van Stijn
51a2d6c80f Merge pull request #50787 from austinvazquez/move-registry-search-options-to-client
api/types/registry: move registry search options to client
2025-08-22 12:02:05 +02:00
Sebastiaan van Stijn
35a36ce058 Merge pull request #50789 from austinvazquez/move-volume-list-options-from-api-to-client
api/types/volume: move volume list options from api to client
2025-08-22 12:00:50 +02:00
Sebastiaan van Stijn
3dd85da3dc Merge pull request #50788 from austinvazquez/move-system-types-from-api-to-client
api/types/system: move `DiskUsageOptions` to client mod
2025-08-22 10:29:12 +02:00
Austin Vazquez
7aa50424e3 daemon: decouple daemon backend from client volume list options
Signed-off-by: Austin Vazquez <austin.vazquez@docker.com>
2025-08-21 21:58:52 -05:00
Austin Vazquez
9fc6a1e437 api/types/volume: refactor volume options to prune report
Signed-off-by: Austin Vazquez <austin.vazquez@docker.com>
2025-08-21 21:52:19 -05:00
Austin Vazquez
ee22a62dd5 client: refactor ListOptions to VolumeListOptions
Signed-off-by: Austin Vazquez <austin.vazquez@docker.com>
2025-08-21 21:47:59 -05:00
Austin Vazquez
c48585f104 api/types/volume: move ListOptions to client mod
Signed-off-by: Austin Vazquez <austin.vazquez@docker.com>
2025-08-21 21:46:19 -05:00
Austin Vazquez
56626a1222 api/types/system: move DiskUsageOptions to client mod
Signed-off-by: Austin Vazquez <austin.vazquez@docker.com>
2025-08-21 21:26:55 -05:00
Austin Vazquez
4665aa11ce client: refactor SearchOptions to ImageSearchOptions
Signed-off-by: Austin Vazquez <austin.vazquez@docker.com>
2025-08-21 21:17:54 -05:00
Austin Vazquez
40025bdf43 api/types/registry: move SearchOptions to client
Signed-off-by: Austin Vazquez <austin.vazquez@docker.com>
2025-08-21 21:15:21 -05:00
Sebastiaan van Stijn
e8d0aba254 vendor: golang.org/x/sync v0.16.0
full diff: https://github.com/golang/sync/compare/v0.14.0...v0.16.0

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-08-22 00:56:08 +02:00
Sebastiaan van Stijn
60125b888c contrib: update dockerfiles to debian 13 "trixie"
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-08-21 23:37:14 +02:00
Sebastiaan van Stijn
39d4dbea9c Dockerfile: update debian frozen image to trixie-slim
docker buildx imagetools inspect docker.io/library/debian:trixie-slim
    Name:      docker.io/library/debian:trixie-slim
    MediaType: application/vnd.oci.image.index.v1+json
    Digest:    sha256:c85a2732e97694ea77237c61304b3bb410e0e961dd6ee945997a06c788c545bb

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-08-21 23:35:26 +02:00
Sebastiaan van Stijn
15f92925f0 vendor: go.etcd.io/bbolt v1.4.3
Fix potential data corruption in (*Tx)WriteTo if underlying db file
is overwritten

full diff: https://github.com/etcd-io/bbolt/compare/v1.4.2...v1.4.3

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-08-21 23:05:05 +02:00
Austin Vazquez
ea126c0541 Merge pull request #50760 from vvoland/c8d-default-notsomuch
daemon: Fix forceful switch to containerd image store
2025-08-21 12:26:35 -07:00
Austin Vazquez
feee8fab15 Merge pull request #50774 from austinvazquez/move-events-list-options-from-api-to-client
api/types/events: move events list options from api to client
2025-08-21 11:26:32 -07:00
Paweł Gronowski
f0da9ae801 Merge pull request #50773 from austinvazquez/move-container-resize-options-from-api-to-client
api/types/container: move container resize options from api to client
2025-08-21 20:19:01 +02:00
Sebastiaan van Stijn
036c067c80 Merge pull request #50759 from thaJeztah/deprecate_old_stream_fields
client/pkg/jsonmessage: remove unused fields
2025-08-21 16:57:39 +02:00
Albin Kerouanton
18651d8819 Merge pull request #50691 from akerouanton/portallocator-socket-filter
libnet/pa: OSAllocator: retry allocations
2025-08-21 11:50:57 +02:00
Austin Vazquez
4774fb2c11 Merge pull request #50767 from thaJeztah/stats_cleanups
daemon: Daemon.ContainerStats: small cleanups
2025-08-20 15:25:42 -07:00
Cory Snider
f445d26d68 Merge pull request #50724 from corhere/libn/bitmap-onescount
daemon/libnetwork/bitmap: add OnesCount method
2025-08-20 17:45:18 -04:00
Sebastiaan van Stijn
c8c4996ebf Merge pull request #50764 from austinvazquez/move-disk-usage-types-to-daemon-backend
api/types: move disk usage structs to daemon backend
2025-08-20 18:33:54 +02:00
Austin Vazquez
eb9774cbf9 client: rename ListOptions type to EventsListOptions
Signed-off-by: Austin Vazquez <austin.vazquez@docker.com>
2025-08-20 08:31:04 -05:00
Austin Vazquez
d73dd4990c api/types/events: move ListOptions type to client
Signed-off-by: Austin Vazquez <austin.vazquez@docker.com>
2025-08-20 08:29:20 -05:00
Austin Vazquez
db72cc28c7 Rename test helper function input parameters to not shadow client package
Signed-off-by: Austin Vazquez <austin.vazquez@docker.com>
2025-08-20 08:27:42 -05:00
Austin Vazquez
f07d359043 client: rename ResizeOptions type to ContainerResizeOptions
Signed-off-by: Austin Vazquez <austin.vazquez@docker.com>
2025-08-20 07:41:57 -05:00
Austin Vazquez
882fd68b1b api/types/container: move ResizeOptions type to client
Signed-off-by: Austin Vazquez <austin.vazquez@docker.com>
2025-08-20 07:40:18 -05:00
Albin Kerouanton
14262696d7 libnet/pa: OSAllocator: retry allocations
Previous commit changed the OSAllocator to listen after binding a port,
such that we're 100% sure that the port is free. We can now make the
OSAllocator responsible for retrying port allocations when it tries to
find an ephemeral port, or a free port in a range.

Move the retry logic from the 'nat' portmapper to the OSAllocator.

Signed-off-by: Albin Kerouanton <albinker@gmail.com>
2025-08-20 12:02:34 +02:00
Albin Kerouanton
201968cc03 libnet/pa: OSAllocator: listen after bind
Move the listen syscall to the `OSAllocator` such that when
`RequestPortsInRange` returns, callers are guaranteed that the allocated
port isn't used by another process.

Bind and listen syscalls were previously split because listening before
inserting DNAT rules could cause connections to be accepted by the
kernel, so packets would never be forwarded to the container.

But, pulling them apart has an undesirable drawback: if another process
is racing against the Engine, and starts listening on the same port,
the conflict wouldn't be detected until OSAllocator's callers issue a
'listen' syscall. This means that callers need to implement their own
retry logic.

To overcome both drawbacks, set a cBPF socket filter on the socket
before it's bound, and let callers call `DetachSocketFilter` to remove
it. Now, callers are guaranteed that the port is free to use, and no
connections will be accepted prematurely.

For TCP / SCTP clients, this means that they'll send the first handshake
packet (e.g. SYN), but the kernel won't reply (e.g. SYN-ACK), and they
will retry until DNAT rules are configured or the socket filter is
removed.

Signed-off-by: Albin Kerouanton <albinker@gmail.com>
2025-08-20 12:02:04 +02:00
Paweł Gronowski
86ae7a56d2 daemon: Fix container restore with automatic driver selection
Fix a bug causing containers not being loaded when storage driver wasn't
chosen explicitly.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-08-20 11:20:51 +02:00
Paweł Gronowski
555e3939c9 daemon: Fix forceful switch to containerd image store
When no explicit driver was specified, the containerd store by default
was also applied to existing graphdriver setups.

Fix this and add a test.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-08-20 11:20:50 +02:00