1
0
mirror of https://github.com/moby/moby.git synced 2025-04-18 20:44:11 +03:00

52163 Commits

Author SHA1 Message Date
Akihiro Suda
01f442b84d
Merge pull request #49588 from thaJeztah/bump_go_build_tags
update go:build tags to go1.23 to align with vendor.mod
v28.1.1
2025-04-18 13:25:23 +09:00
Akihiro Suda
e03c0f03e7
Merge pull request #49834 from thaJeztah/cleanup_ignore
cleanup ignore files
2025-04-18 13:24:33 +09:00
Akihiro Suda
8dde918e77
Merge pull request #49837 from thaJeztah/bump_containerd_2.0.5
vendor: github.com/containerd/containerd v2.0.5, golang.org/x/oauth2 v0.29.0
2025-04-18 13:04:42 +09:00
Akihiro Suda
e70ce7a35b
Merge pull request #49833 from vvoland/rootless-iptables-check
contrib/rootless-setuptool: Fix iptables detection
2025-04-18 08:56:51 +09:00
Sebastiaan van Stijn
fc8361c078
vendor: github.com/containerd/containerd v2.0.5
full diff: https://github.com/containerd/containerd/compare/v2.0.4...v2.0.5

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-04-17 22:01:00 +02:00
Sebastiaan van Stijn
62f51e4367
vendor: golang.org/x/oauth2 v0.29.0
notable changes

- oauth2.go: use a more straightforward return value
- oauth2: Deep copy context client in NewClient
- jws: improve fix for CVE-2025-22868

full diff: https://github.com/golang/oauth2/compare/v0.27.0...v0.29.0

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-04-17 22:00:44 +02:00
Sebastiaan van Stijn
bbbb0036df
cleanup ignore files
- We now only use winresources for the dockerd binary, so we can
  reduce some uses of wildcards
- Use explicit ("/") to indicate these should only be ignored
  relative to the root of the repository and build-context
- Remove remnant ignore for rpm builds

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-04-17 19:25:47 +02:00
Paweł Gronowski
ead379a464
contrib/rootless-setuptool: Fix iptables detection
Fix a logical error in the rootless setup tool where the iptables error
handling was incorrectly placed. The code was setting
`faced_iptables_error=1` even when iptables was available, causing
unnecessary error messages and setup suggestions.

This patch correctly moves the error handling into the `else` branch so
that we only report iptables errors when the command is actually
unavailable.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-04-17 19:23:15 +02:00
Sebastiaan van Stijn
7c52c4d92e
update go:build tags to go1.23 to align with vendor.mod
Go maintainers started to unconditionally update the minimum go version
for golang.org/x/ dependencies to go1.23, which means that we'll no longer
be able to support any version below that when updating those dependencies;

> all: upgrade go directive to at least 1.23.0 [generated]
>
> By now Go 1.24.0 has been released, and Go 1.22 is no longer supported
> per the Go Release Policy (https://go.dev/doc/devel/release#policy).
>
> For golang/go#69095.

This updates our minimum version to go1.23, as we won't be able to maintain
compatibility with older versions because of the above.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-04-17 15:43:19 +02:00
Rob Murray
6573a13e4a
Merge pull request #49827 from robmry/warn_no_ext_nameservers
Warn when no external DNS nameservers are found
2025-04-17 14:08:01 +01:00
Rob Murray
619f1ddd05 Warn when no external DNS nameservers are found
Since commit 925b484 ("No fallback nameservers for internal
resolver"), if the host's resolv.conf has no nameservers and
no servers are supplied via config, the internal resolver will
not use Google's DNS - so the container will not be able to
resolve external DNS requests.

That can happen when container's are "restart-always" and the
docker daemon starts before the host's DNS is configured.

So, to highlight the issue (which may not be an error, but
probably is), include a warning in the container's resolv.conf
file.

Also, log a warning - logs currently say "No non-localhost DNS
nameservers are left in resolv.conf. Using default external
servers". But, that's misleading because it's from an initial
resolv.conf setup, before the internal resolver configured without
those fallbacks - we'll drop the fallbacks completely once the
default bridge has an internal resolver).

Signed-off-by: Rob Murray <rob.murray@docker.com>
2025-04-17 10:51:06 +01:00
Paweł Gronowski
3f46cadf39
Merge pull request #49805 from thaJeztah/vendor_goarchive
vendor: github.com/moby/go-archive v0.1.0
v28.1.0-rc.2 v28.1.0
2025-04-16 12:07:48 +00:00
Sebastiaan van Stijn
b57d41c4bf
Merge pull request #49799 from thaJeztah/apparmor_cleanups
profiles/apparmor: add some optimisations and tests
2025-04-16 13:21:25 +02:00
Sebastiaan van Stijn
29edd17909
Merge pull request #49815 from z63d/docs-api-image-tarball-format
docs/api: update image tarball format
2025-04-16 13:05:21 +02:00
Sebastiaan van Stijn
fd550344b1
vendor: github.com/moby/go-archive v0.1.0
full diff: https://github.com/moby/go-archive/compare/21f3f3385ab7...v0.1.0

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-04-16 13:00:13 +02:00
Paweł Gronowski
2834da861b
Merge pull request #49814 from thaJeztah/initlayer_rm_idtools
daemon/initlayer: Setup: remove uses of idtools.Identity
2025-04-16 09:42:35 +00:00
Paweł Gronowski
1f43ad3a16
Merge pull request #49782 from thaJeztah/container_rm_idtools
container: Container.SetupWorkingDirectory: remove use of pkg/idtools
2025-04-16 09:41:35 +00:00
Kaita Nakamura
b8067d159f
docs/api: update image tarball format
Signed-off-by: Kaita Nakamura <kaita.nakamura0830@gmail.com>
2025-04-16 18:02:08 +09:00
Sebastiaan van Stijn
a38ca9a548
daemon/initlayer: Setup: remove uses of idtools.Identity
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-04-16 09:58:24 +02:00
Rob Murray
9c9a6cb941
Merge pull request #49812 from robmry/endpoint_count_for_downgrade
Store an endpoint count for networks, for downgrade
2025-04-15 21:59:50 +01:00
Rob Murray
380ded6309 Store an endpoint count for networks, for downgrade
Since commit 51d7f95 ("libnet: remove struct endpointCnt") an
endpoint count for networks has not been persisted.

But, on downgrade to a version older than that commit, the
missing field caused daemon startup to fail.

So, create the count in the store - it only needs to exist, it's
no longer maintained as a count of endpoints. On downgrade, the
count is probably zero anyway (the daemon is stopped), but the
older daemon fixes it up on startup if necessary.

Signed-off-by: Rob Murray <rob.murray@docker.com>
2025-04-15 17:59:34 +01:00
Sebastiaan van Stijn
c58a765707
Merge pull request #49809 from crazy-max/buildkit-0.21.0
vendor: update buildkit to v0.21.0
2025-04-15 18:20:39 +02:00
CrazyMax
ae0331d8f5
vendor: update buildkit to v0.21.0
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-04-15 17:04:25 +02:00
Paweł Gronowski
b2d06baf9b
Merge pull request #49806 from robmry/missing_firewaller_error_check
bridge: Add a missing error check for firewaller setup
2025-04-15 13:06:27 +00:00
Rob Murray
57bf7a8c70 bridge: Add a missing error check for firewaller setup
It got lost in commit 29e0db2 ("Factor out top-level iptables
setup into its own object").

Signed-off-by: Rob Murray <rob.murray@docker.com>
2025-04-15 12:05:10 +01:00
Paweł Gronowski
bb8fcf3031
Merge pull request #49802 from vvoland/TestStopContainerWithTimeout-noparallel
integration/TestStopContainerWithTimeout: Attempt to fix flakiness
2025-04-14 15:19:25 +00:00
Paweł Gronowski
c49ce64514
integration/TestStopContainerWithTimeout: Attempt to fix flakiness
Temporarily remove Parallel.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-04-14 12:31:52 +02:00
Akihiro Suda
aa51a79ef9
Merge pull request #49800 from thaJeztah/seccomp_stdlib
profiles/seccomp: use stdlib for asserting, remove "// import" comments
2025-04-13 00:51:57 +09:00
Sebastiaan van Stijn
ecde7b9b7c
Merge pull request #49797 from jsternberg/buildkit-rc2
vendor: github.com/moby/buildkit v0.21.0-rc2
2025-04-12 14:25:17 +02:00
Sebastiaan van Stijn
7eda35fd05
profiles/apparmor: IsLoaded: optimize
- Use a bufio.Scanner to read the profiles
- Use strings.Cut

Before/After:

    BenchmarkIsLoaded-10  2258	    508049 ns/op    244266 B/op    10004 allocs/op
    BenchmarkIsLoaded-10  5680	    208703 ns/op      4264 B/op	       4 allocs/op

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-04-12 13:34:13 +02:00
Sebastiaan van Stijn
0462b5e318
profiles/apparmor: add BenchmarkIsLoaded
go test -bench=. ./profiles/apparmor/
    goos: linux
    goarch: arm64
    pkg: github.com/docker/docker/profiles/apparmor
    BenchmarkIsLoaded-10    	    2258	    508049 ns/op	  244266 B/op	   10004 allocs/op
    PASS
    ok  	github.com/docker/docker/profiles/apparmor	1.210s

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-04-12 13:34:13 +02:00
Sebastiaan van Stijn
b23d267cb5
profiles/apparmor: add basic unit-test for IsLoaded
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-04-12 13:34:12 +02:00
Sebastiaan van Stijn
0dd5959eeb
profiles/apparmor: InstallDefault: slight cleanup and optimization
The existing code was more complicated than needed. By default, the daemon
runs "unconfined", but we try to detect the current profile that's set.
When failing to do so (error, or detected profile is empty), we assume
the default ("unconfined").

This patch simplifies the logic;

- Set the default ("unconfined")
- Only update the default when we successfully found the current profile
  (no error occurred, and the profile is not empty).

While updating, also;

- Replaced use of `strings.SplitN` for `strings.Cut`, which is more
  efficient, and doesn't allocate.
- Move constructing the profileData closer to where it's used.
- Remove intermediate var.
- Combine defers and change the order (close file first, before removing),
  and suppress errors to keep linters happy.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-04-12 13:34:12 +02:00
Sebastiaan van Stijn
0bb761698c
profiles/apparmor: loadprofile: fix double command in error message
`exec.Cmd.Path` already contains the command that was executed, so we
were printing the command twice. However, `exec.Cmd` implements a stringer
interface, which provides a readable version of the command that was
executed, so use that instead. While updating, lso change backticks in
the error for regular quotes.

Before:

    running `/usr/sbin/apparmor_parser apparmor_parser -Kr /no/such/file` failed with output: Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
    Warning: unable to find a suitable fs in /proc/mounts, is it mounted?
    Use --subdomainfs to override.

    error: exit status 1

After:

    running '/usr/sbin/apparmor_parser -Kr /no/such/file' failed with output: Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
    Warning: unable to find a suitable fs in /proc/mounts, is it mounted?
    Use --subdomainfs to override.

    error: exit status 1

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-04-12 13:34:12 +02:00
Sebastiaan van Stijn
8e1c366773
profiles/apparmor: remove "// import" comments
We are considering moving the apparmor profile to a separate module,
so removing these comments in preparation. These comments are ignored
already when building in go module mode, so have little benefits.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-04-12 13:34:12 +02:00
Sebastiaan van Stijn
1fa6a46c5d
profiles/seccomp: remove "// import" comments
We are considering moving the seccomp profile to a separate module,
so removing these comments in preparation. These comments are ignored
already when building in go module mode, so have little benefits.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-04-12 10:46:03 +02:00
Sebastiaan van Stijn
89604f1df1
profiles/seccomp: use stdlib for asserting
We are considering moving the seccomp profile to a separate module,
so reducing the list of dependencies for this package.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-04-12 10:26:10 +02:00
Jonathan A. Sternberg
14623770e1
vendor: github.com/moby/buildkit v0.21.0-rc2
Signed-off-by: Jonathan A. Sternberg <jonathan.sternberg@docker.com>
2025-04-11 14:02:47 -05:00
Paweł Gronowski
250792c1a5
Merge pull request #49795 from thaJeztah/revert_info_changes
Revert "API: /info: remove BridgeNfIptables, BridgeNfIp6tables fields"
v28.1.0-rc.1
2025-04-11 13:17:24 +00:00
Sebastiaan van Stijn
eacbbdeec6
Revert "API: /info: remove BridgeNfIptables, BridgeNfIp6tables fields"
This reverts commit 5d2006256f15f7252c11bd72d632de26a8b2ff06, which
caused some issues in the docker/cli formatting code that needs some
investigating.

Let's (temporarily) revert this while we look what's wrong.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-04-11 14:47:10 +02:00
Paweł Gronowski
73520a5ab7
Merge pull request #49793 from vvoland/cut-api
docs/api: add documentation for API v1.49
2025-04-11 11:40:21 +00:00
Paweł Gronowski
36f87754c2
Merge pull request #49794 from vvoland/update-authors
Update AUTHORS
2025-04-11 11:40:06 +00:00
Paweł Gronowski
ece7e02b86
Update AUTHORS
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-04-11 13:08:52 +02:00
Paweł Gronowski
adb9e9135a
docs/api: add documentation for API v1.49
Copy the swagger / OpenAPI file to the documentation. This is the API
version used by the upcoming v28.1.0 release.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-04-11 13:01:02 +02:00
Paweł Gronowski
f3d6830d27
Merge pull request #49783 from thaJeztah/deprecate_bridgenfip_fields
API: /info: remove BridgeNfIptables, BridgeNfIp6tables fields
2025-04-11 10:46:59 +00:00
Paweł Gronowski
cdad178d02
Merge pull request #49789 from akerouanton/trace-containerCreate-labels
daemon: containerCreate, containerStart: add filtered labels to OTel span
2025-04-11 10:34:02 +00:00
Paweł Gronowski
fb2983ab0d
Merge pull request #49677 from vvoland/integration-cli-bump-cli
integration-cli: Update default CLI version to v18.06.3-ce
2025-04-11 10:32:36 +00:00
Sebastiaan van Stijn
a6928fd396
Merge pull request #49787 from thaJeztah/bump_registry
Dockerfile: update registry to v3.0.0
2025-04-10 22:13:58 +02:00
Sebastiaan van Stijn
511cd1c0a7
Merge pull request #49785 from thaJeztah/fix_debug_logs
api/server/middleware: fix debug-logs missing form-data
2025-04-10 21:54:00 +02:00
Sebastiaan van Stijn
e2b95a9525
Merge pull request #49770 from dmcgowan/containerd-registry-error-handling
Add registry error handling for push and pull
2025-04-10 21:32:56 +02:00