Commit Graph

52878 Commits

Author SHA1 Message Date
Kevin Alvarez
0ea20c9f72 cmd: fix winresources and move them out cli package
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-06-26 15:56:23 +02:00
Paweł Gronowski
ee49437e38 Merge pull request #50010 from dmcgowan/dockerd-command-daemon
Split dockerd main command to package under daemon
2025-06-26 10:19:06 +00:00
Sebastiaan van Stijn
1daa58a4ca Merge pull request #50267 from vvoland/gha-tags-fixcomment
gha/bin-image: update tags comment
2025-06-25 20:31:37 +02:00
Paweł Gronowski
d72f219a11 gha/bin-image: update tags comment
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-06-25 16:50:44 +02:00
Sebastiaan van Stijn
85aa504a8f Merge pull request #50263 from vvoland/gha-tags
gha/bin-image: add major and minor version image tags
2025-06-25 14:47:27 +02:00
Sebastiaan van Stijn
82ca3ccaf3 Merge pull request #50265 from austinvazquez/update-maintainer-info
Update maintainer info for austinvazquez
2025-06-25 08:19:12 +02:00
Austin Vazquez
f8fcc20c3b Update maintainer info for austinvazquez
Signed-off-by: Austin Vazquez <austin.vazquez.dev@gmail.com>
2025-06-24 15:09:37 -07:00
Paweł Gronowski
38b98bcf68 gha/bin-image: add major and minor version image tags
Adding image tags that follow the semver major and minor versions (e.g., `28`
and `28.3`) for the moby-bin images.

This makes it easier for users to reference the latest build within a
major or minor version series without having to know the exact
minor/patch version.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-06-24 23:30:58 +02:00
Sebastiaan van Stijn
ed1406cb93 Merge pull request #50236 from corhere/libn/overlay-really-delete-neigh
libn/d/overlay: delete FDB entry from AF_BRIDGE
2025-06-24 18:13:54 +02:00
Sebastiaan van Stijn
4bcb850902 Merge pull request #50257 from thaJeztah/TestCreateByImageID_minor_nits
integration/container: TestCreateByImageID: minor improvements
2025-06-24 13:14:40 +02:00
Derek McGowan
33139da522 Split part of dockerd main to command under daemon
Allows using daemon/internal packages when creating dockerd

Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-06-23 14:45:03 -07:00
Derek McGowan
98047c5190 Move cmd/dockerd/trap to daemon/command/trap
Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-06-23 14:45:03 -07:00
Derek McGowan
ea11b5f3fe Move cmd/dockerd/debug to daemon/command/debug
Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-06-23 14:45:02 -07:00
Albin Kerouanton
a41225dcfd Merge pull request #50091 from corhere/libn/overlay-refactor-checkencryption
libnetwork/d/overlay: simplify the encryption logic
2025-06-23 21:32:02 +02:00
Sebastiaan van Stijn
6edb15c5fc Merge pull request #50255 from crazy-max/update-govulncheck
dockerfile: update govulncheck to v1.1.4
2025-06-23 13:04:31 +02:00
Sebastiaan van Stijn
53475e1adf integration/container: TestCreateByImageID: minor improvements
- Assert that we're not using empty IDs
- stringid.TruncateID already truncates algorithm, so we can just feed
  it the full id
- Fail early on error, and skip asserting the `resp.ID` to reduce some
  noise;

    === FAIL: github.com/docker/docker/integration/container TestCreateByImageID/image_short-ID (60.33s)
        create_test.go:134: assertion failed: resp.ID is ""
        create_test.go:135: assertion failed: error is not nil: error during connect: Post "http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.48/containers/create": EOF

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-06-23 12:19:44 +02:00
CrazyMax
fcf666f9b0 dockerfile: update govulncheck to v1.1.4
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-06-23 10:02:38 +02:00
Paweł Gronowski
4ac341638f Merge pull request #50246 from thaJeztah/simplify_headers
client: Client.addHeaders: remove special handling for api < 1.25
2025-06-20 18:39:39 +00:00
Paweł Gronowski
f8bd49525b Merge pull request #50224 from thaJeztah/faster_trim
daemon: LogContainerEventWithAttributes: minor optimisation
2025-06-20 16:31:32 +00:00
Paweł Gronowski
8d39ec90ac Merge pull request #50245 from vvoland/cut-api
docs: cut api docs for v1.51
2025-06-20 16:17:05 +00:00
Sebastiaan van Stijn
8c067c5223 client: Client.addHeaders: remove special handling for api < 1.25
Commit e98e4a7111 introduced functionality
to hide experimental commands, and hide commands based on API version
negotiation. Before that commit, the user-agent header was used to detect
version-mismatches between the daemon and client based on their binary
version;
3975d648b7/api/server/middleware/user_agent.go (L32-L44)

Because of the above, a check was added to prevent custom headers from
modifying the User-Agent, but given that the user-agent header changed
formatting, and api < 1.25 is long deprecated, it's not very meaningful
to add this check, so let's remove it.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-06-20 18:10:04 +02:00
Paweł Gronowski
ef50844a0b docs: cut api docs for v1.51
Used by the upcoming 28.3.0 release

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-06-20 18:00:53 +02:00
Paweł Gronowski
dc14a75b24 Merge pull request #50177 from thaJeztah/tweak_timeouts
gha: lower timeouts on "build" and "merge" steps
2025-06-20 14:28:21 +00:00
Sebastiaan van Stijn
6025adfbef Merge pull request #50226 from robmry/driver_api_optional_extconn
libnet: split ProgramExternalConnectivity/RevokeExternalConnectivity out of driverapi
2025-06-20 13:31:18 +02:00
Sebastiaan van Stijn
381699364e Merge pull request #50238 from crazy-max/buildkit-0.23.1
vendor: update buildkit to v0.23.1
2025-06-20 13:23:17 +02:00
Sebastiaan van Stijn
9a465b6ab1 Merge pull request #50231 from thaJeztah/update_cgroups
vendor: github.com/opencontainers/cgroups v0.0.3
2025-06-20 13:00:12 +02:00
Sebastiaan van Stijn
775f50e821 Merge pull request #50233 from thaJeztah/validate_mirrors
daemon/config: Validate: add missing validation for registry mirrors and improve errors
2025-06-20 12:50:48 +02:00
Sebastiaan van Stijn
a0f36cc926 Merge pull request #50220 from thaJeztah/fix_event_ordering
daemon: containerStop: fix ordering of "stop" and "die" events
2025-06-20 12:44:17 +02:00
CrazyMax
5a02e7f4e3 vendor: update buildkit to v0.23.1
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-06-20 11:38:08 +02:00
Paweł Gronowski
e124ab621c Merge pull request #50237 from dmcgowan/update-containerd-2.1.3
Update containerd to v2.1.3
2025-06-20 09:27:26 +00:00
Derek McGowan
b466c35da1 Update containerd to v2.1.3
Fixes various issues with pulling from registries

Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-06-19 15:57:03 -07:00
Cory Snider
7a12bbe5d3 libn/d/overlay: delete FDB entry from AF_BRIDGE
Starting with commit 0d6e7cd983
DeleteNeighbor() needs to be called with the same options as the
AddNeighbor() call that created the neighbor entry. The calls in peerdb
were modified incorrectly, resulting in the deletes failing and leaking
neighbor entries. Fix up the DeleteNeighbor calls so that the FDB entry
is deleted from the FDB instead of the neighbor table, and the neighbor
is deleted from the neighbor table instead of the FDB.

Signed-off-by: Cory Snider <csnider@mirantis.com>
2025-06-19 17:24:16 -04:00
Sebastiaan van Stijn
1d8545d60c daemon/config: Validate: add missing validation for registry mirrors
Validation of registry mirrors was performed during daemon startup,
but after the config-file was validated. As a result, the `--validate`
option would incorrectly print that the configuration was valid, but
the daemon would fail to start;

    echo '{"registry-mirrors":["example.com"]}' > my-config.json
    dockerd --config-file ./my-config.json --validate
    configuration OK

    dockerd --config-file ./my-config.json
    # ...
    failed to start daemon: invalid mirror: no scheme specified for "example.com": must use either 'https://' or 'http://'

With this patch applied, validation is also performed as part of the
daemon config validation;

    echo '{"registry-mirrors":["example.com"]}' > my-config.json
    dockerd --config-file ./my-config.json --validate
    unable to configure the Docker daemon with file ./my-config.json: merged configuration validation from file and command line flags failed: invalid mirror: no scheme specified for "example.com": must use either 'https://' or 'http://'

    # fix the invalid config
    echo '{"registry-mirrors":["https://example.com"]}' > my-config.json
    dockerd --config-file ./my-config.json --validate
    configuration OK

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-06-19 14:22:11 +02:00
Sebastiaan van Stijn
307c18598d registry: ValidateMirror: improve validation for missing schemes
Before this patch, a missing scheme would sometimes produce a confusing
error message. If no scheme was specified at all, an empty "" would be
included in the message;

    echo '{"registry-mirrors":["example.com"]}' > my-config.json
    dockerd --config-file ./my-config.json
    # ...
    failed to start daemon: invalid mirror: unsupported scheme "" in "example.com"

If a scheme was missing, but a port was included, the hostname would be
printed as the scheme;

    echo '{"registry-mirrors":["example.com:8080"]}' > my-config.json
    dockerd --config-file ./my-config.json
    # ...
    failed to start daemon: invalid mirror: unsupported scheme "example.com" in "example.com:8080"

With this patch applied, the error messages are slightly more user-friendly;

    echo '{"registry-mirrors":["example.com"]}' > my-config.json
    dockerd --config-file ./my-config.json
    # ...
    failed to start daemon: invalid mirror: no scheme specified for "example.com": must use either 'https://' or 'http://'

    echo '{"registry-mirrors":["example.com:8080"]}' > my-config.json
    dockerd --config-file ./my-config.json
    # ...
    failed to start daemon: invalid mirror: no scheme specified for "example.com:8080": must use either 'https://' or 'http://'

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-06-19 14:21:58 +02:00
Sebastiaan van Stijn
a90da2edc3 vendor: github.com/opencontainers/cgroups v0.0.3
- ConvertCPUSharesToCgroupV2Value: improve
- Add .github/dependabot.yml
- Remove annotations from Resources (fixes a regression introduced in v0.0.2)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-06-19 12:38:04 +02:00
Akihiro Suda
bd965df6ae Merge pull request #50207 from thaJeztah/bump_alpine
gha: dco: bump alpine to 3.22
2025-06-19 18:26:10 +09:00
Sebastiaan van Stijn
bb858f3b27 Merge pull request #50229 from corhere/libn/fix-networkdb-dns-update-delete
libnetwork: fix flaky Swarm service DNS
2025-06-19 10:29:43 +02:00
Cory Snider
a7f01d238e libnetwork: fix flaky Swarm service DNS
When libnetwork receives a watch event for a driver table entry from
NetworkDB it passes the event along to the interested driver. This code
contains a subtle bug: update events from NetworkDB are passed along to
the driver as Delete events! This bug was lying dormant as driver-table
entries can only be added by the driver, not updated. Now that NetworkDB
broadcasts an UpdateEvent to watchers if the entry is already known to
the local NetworkDB, irrespective of whether the event received from the
remote peer was a CREATE or UPDATE event, the bug is causing problems.
Whenever a remote node replaces an entry in the overlay_peer_table but
the intermediate delete state was not received by the local node, the
new CREATE event would be translated to an UpdateEvent by NetworkDB and
subsequently handled by the overlay driver as if the entry was deleted!

Bubble table UPDATE events up to the network driver as Update events.

Signed-off-by: Cory Snider <csnider@mirantis.com>
2025-06-18 17:58:08 -04:00
Sebastiaan van Stijn
062082ec9b daemon: containerStop: fix ordering of "stop" and "die" events
Commit 8e6cd44ce4 added synchronisation to
wait for the container's status to be updated in memory. However, since
952902efbc, a defer was used to produce
the container's "stop" event.

As a result of the sychronisation that was added, the "die" event would
now be produced before the "stop" event.

This patch moves the locking inside the defer to restore the previous
behavior.

Unfortunately the order of events is still not guaranteed, because events
are emited from multiple goroutines that don't have synchronisation between
them; this is something to look at for follow ups. This patch keeps the status
quo and should preserve the old behavior, which was "more" correct in most
cases.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-06-18 20:42:52 +02:00
Cory Snider
de24c536b0 Merge pull request #50193 from corhere/libn/networkdb-fix-crudtable-flakes-harder
libnetwork/networkdb: prioritize local table broadcasts over event rebroadcasts
2025-06-18 13:34:57 -04:00
Rob Murray
bf002e51a0 Split [Program|Revoke]ExternalConnectivity out of libnet driverapi
Signed-off-by: Rob Murray <rob.murray@docker.com>
2025-06-18 17:38:35 +01:00
Sebastiaan van Stijn
0c56619d79 Merge pull request #50218 from thaJeztah/deprecate_execconfig_detach
api/types/container: deprecate ExecOptions.Detach
2025-06-18 17:52:39 +02:00
Sebastiaan van Stijn
d85513e1a3 daemon: LogContainerEventWithAttributes: minor optimisation
As we're only expecting a single `/` prefix to be trimmed from the
container name, it's better to use `TrimPrefix` than `TrimLeft`, as
`TrimPrefix` takes a cut-set to remove any character in the set.

Benchmarking both;

    BenchmarkTrimLeft-10      535364544    2.204  ns/op    0 B/op    0 allocs/op
    BenchmarkTrimPrefix-10   1000000000    0.3148 ns/op    0 B/op    0 allocs/op

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-06-18 13:14:43 +02:00
Sebastiaan van Stijn
d31f67f4ea Merge pull request #50209 from thaJeztah/pkg_idtools_deprecate
pkg/idtools: deprecate IdentityMapping, Identity.Chown
2025-06-18 12:23:35 +02:00
Rob Murray
b387526fce Merge pull request #49981 from robmry/drop_inc_rules
Drop DOCKER-ISOLATION rules
2025-06-17 20:22:00 +01:00
Sebastiaan van Stijn
b0d6155e7c Merge pull request #50180 from robmry/test_nftabler
Add TestNftabler
2025-06-17 21:11:30 +02:00
Sebastiaan van Stijn
5b9fa6c07a Merge pull request #50222 from jsternberg/buildkit-update
vendor: github.com/moby/buildkit v0.23.0
2025-06-17 20:36:11 +02:00
Rob Murray
ec185e57cf Test Nftabler params
Signed-off-by: Rob Murray <rob.murray@docker.com>
2025-06-17 18:28:20 +01:00
Jonathan A. Sternberg
e43968d7ed vendor: github.com/moby/buildkit v0.23.0
Signed-off-by: Jonathan A. Sternberg <jonathan.sternberg@docker.com>
2025-06-17 12:17:47 -05:00
Sebastiaan van Stijn
0c182d4d57 api/types/container: deprecate ExecOptions.Detach
This field was added in 5130fe5d38, which
added it for use as intermediate struct when parsing CLI flags (through
`runconfig.ParseExec`) in c786a8ee5e.

Commit 9d9dff3d0d rewrote the CLI to use
Cobra, and as part of this introduced a separate `execOptions` type in
`api/client/container`.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-06-17 12:38:33 +02:00