Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lookup docker-proxy in libexec paths #47804

Merged
merged 1 commit into from
Jun 20, 2024

Conversation

cpuguy83
Copy link
Member

@cpuguy83 cpuguy83 commented May 7, 2024

This allows distros to put docker-proxy under libexec paths as is done for docker-init.

Also expands the lookup to to not require a docker/ subdir in libexec subdir.
Since it is a generic helper that may be used for something else in the future, this is only done for binaries with a docker-.

Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OHMAN... I went down the rabbit hole on this one 🙈

We may need to have a closer look to see what potential consequences / impact is, taking into consideration that;

  • we have various types of helper binaries that uses docker- prefixes for selection ("init", "userland-proxy", "cli-plugins", "credential helpers")
  • for some of those, we have some stricter defined locations to look for (/usr/libexec/docker/cli-plugins/) to prevent potential mis-matches (and maybe for performance reasons to some extent?)
  • in light of some recent changes w.r.t. AppArmor; may any of these binaries require an AppArmor profile to be applied (and if so, will those be based on their path/location)?

At least, it looks like some of this is undocumented behavior; for both the init binary and the userland-proxy, the flag description defines that it must specify the path. I somewhat wonder if "looking up" the binary was intentional, or an oversight;

--init-path string                      Path to the docker-init binary
--userland-proxy-path string            Path to the userland proxy binary

The example daemon.json in the documentation also uses an absolute path for both, which somewhat indicates that it's expected to be a full-path;

  "init-path": "/usr/libexec/docker-init",
  "userland-proxy-path": "/usr/libexec/docker-proxy",

Rather ironically, it looks like the default location we use for the docker-init binary is /usr/bin/docker-init, which means that specifying docker-init (without path) would fail to resolve. If we consider that binary not intended to be executed directly by users or shell scripts, then.. should we change that location?

Looking at the history of that ``, I see it was added in 6caaa8c (#45198), and I think there's some hairy parts there;

  • ee3ac3a (Add init process for zombie fighting and signal handling  #26061) introduced the --init option. Originally, it was not configurable, and (out of convenience?) we looked up the docker-init binary for every container
  • 6a12685 (configure docker-init binary path #26941) made the path configurable in both the daemon config, and per container.
    • It looks like the INTENT was to allow configuring the full path to the binary to use
    • But the daemon config did NOT validate if it was a full path, fully depending on Daemon.populateCommonSpec() to only lookup the path if it's empty (and otherwise fail if it was a relative path)?
    • Daemon.populateCommonSpec() would ONLY do a exec.LookPath() if the daemon did not have a config set, and if the container's HostConfig didn't have a path set
  • a18d103 (remove --init-path from client #32470) removed the per-container config for the path
  • 2790ac6 (Add external binaries version to docker info #27955) is where things started to become blurry;
    • This PR added version information for the docker-init binary to docker info
    • But it only used the default (docker-init) binary, and didn't take custom init into account; it also unconditionally looked up the binary (exec.Command("docker-init", "--version"))
  • 17b1288 (Fix missing Init Binary in docker info output #32469) is where we went off the rails;
    • this PR fixed docker info not taking the configured init into account
    • but unconditionally kep the exec.Command(), so now "allowing" the custom init path to be relative
    • it also codified this change in behavior by adding a test (TestCommonUnixGetInitPath). The test only covered the daemon config so things would (likely) still fail when trying to use, but all test-cases use a relative path (binary name only)
  • 6caaa8c (Prefer loading docker-init from an appropriate "libexec" directory #45198) improved looking up the binary, to not use a blanket exec.LookPath, and instead prefer "libexec" paths
    • ☝️ probably we should've updated the default location of the binary (/usr/bin/docker-init) as well in our packaging for this, but we didn't
    • ☝️ it introduced config.LookupInitPath(), which internally use the config.GetInitPath() 👈 this becomes relevant!
    • ☝️ ⚠️ because it also changed WithCommonOptions() to now use daemon.configStore.LookupInitPath(); previously, this would ONLY lookup the binary if the daemon config was empty (so ONLY lookup the default docker-init binary)
    • ☝️ but now, it would unconditionally lookup the binary, and due to the missing validation for --init-path in the daemon config ("must be absolute"), we now changed behavior, and allowed for a non-absolute path to be specified.

I realize this is for docker-init, not for docker-userland-proxy, but we may have to check that one as well 🙈

Comment on lines 150 to 153
if filepath.IsAbs(binary) {
return binary, nil
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is already handled by lookupBinPath, so looks like this check is redundant

Comment on lines 129 to 132
// According to FHS, it is not necessary to have a subdir here.
// If the binary has a `docker-` prefix, let's look it up without the prefix.
if strings.HasPrefix("docker-", binary) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm... honestly, it didn't occur to me that we currently allow for a non-absolute path (e.g. just hello) to be specified, and that to be resolved to (e.g.) /usr/local/libexec/docker/hello.

Nothing wrong with this code (I think) but now I'm wondering what we document / define for this, and if that's documented behavior. Basically, curious if we could make it;

  • either specify full path
  • or specify a docker- prefixed binary
  • and to not allow for the more "fuzzy" approach?

One thing that could be a potential risk is for this to be matching CLI plugins or credentials helpers;

  • for CLI plugins we currently use (e.g.) /usr/libexec/docker/cli-plugins/docker-buildx as one of the locations, so currently probably not an issue, but it would mean we won't be able to do the same for CLI plugins (i.e., move them to /usr/libexec)
  • for credentials-helpers, I think we use (e.,g.) /usr/bin/docker-credential-secretservice - TBH also wondering if such helpers should be libexec 🤔

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is only for libexec, which I think is the important mitigating factor -- effectively, this check is to ensure that we're not encouraging rampant/unnamespaced pollution of /usr/libexec directly by forcing either specifying an exact path or installing the binaries with an appropriate prefix or within an appropriate subdirectory.

(This is effectively to mirror the /usr/libexec/docker path but without the subdirectory, which according to the FHS is ~reasonable.)

@thaJeztah
Copy link
Member

Looks like a good example of the Swiss cheese model, and it looks like we changed behavior (at least for docker-init) without realizing, due to missing validation in some steps, and existing code also doing the wrong thing, which we started to use in other parts of the stack...

Swiss_cheese_model_textless svg

@thaJeztah
Copy link
Member

Also, I should mention that I'm not "for" or "against" one or the other, but at least it looks like the current behavior (before this change already) does not match the original intent, so there's undocumented behavior. (So the "positive" is that it's undocumented, so we can still correct if we decide to).

Regardless what we decide on, we should properly investigate potential consequences. (Do we paint ourselves into a corner?). I also have "somewhat" in mind the remaining decisions to be made on renaming things (docker -> moby) and if that means we may need to have different search patterns (more flexible lookups may mean even more patterns to search for?).

Finally; I really wonder if the current approach to look up the binary when creating the container is correct; both from a performance perspective (lookup for every container, although this may not be "too" heavy), as well as (not sure?) do we want to look up the docker-init binary at runtime, or should this be done once (on daemon startup)?

@cpuguy83
Copy link
Member Author

cpuguy83 commented May 8, 2024

@thaJeztah The only change this is making is:

  1. The init path may be loaded from */libexec/<name> in addition to other paths
  2. When the proxy path is not set in the config, the default value may now be looked up in */libexec/<name> and */libexec/docker/<name>

When a proxy path is specified int he config, this still requires it to be absolute path.

As far as requiring users to specify an absolute path for the init path, I'm not sure its worth potentially breaking people, but we can certainly make that change.
Consider that these paths are all going to be gated by root access on people's systems.

I don't think this changes anything wrt docker -> moby naming, we'll still have to lookup docker-<bin> unless we decide to break people's systems, in which case we are breaking things anyway.

I don't understand the concern with looking up incorrect binary names (though I know there is a docker init plugin which is confusing AF).

Copy link
Member

@tianon tianon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM (sans a few minor comment nits and Seb's "duplicate IsAbs check" note)

} {
}

// According to FHS, it is not necessary to have a subdir here.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// According to FHS, it is not necessary to have a subdir here.
// According to FHS 3.0, it is not necessary to have a subdir here (see note and reference above).

Comment on lines 129 to 132
// According to FHS, it is not necessary to have a subdir here.
// If the binary has a `docker-` prefix, let's look it up without the prefix.
if strings.HasPrefix("docker-", binary) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is only for libexec, which I think is the important mitigating factor -- effectively, this check is to ensure that we're not encouraging rampant/unnamespaced pollution of /usr/libexec directly by forcing either specifying an exact path or installing the binaries with an appropriate prefix or within an appropriate subdirectory.

(This is effectively to mirror the /usr/libexec/docker path but without the subdirectory, which according to the FHS is ~reasonable.)

daemon/config/config_linux.go Show resolved Hide resolved
@cpuguy83 cpuguy83 force-pushed the more_paths_docker_proxy branch from 3a17c7b to c1274dd Compare May 9, 2024 21:11
Comment on lines 150 to 155
binary := conf.GetInitPath()
if filepath.IsAbs(binary) {
return binary, nil
}

return lookupBinPath(binary)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
binary := conf.GetInitPath()
if filepath.IsAbs(binary) {
return binary, nil
}
return lookupBinPath(binary)
return lookupBinPath(conf.GetInitPath())

👀


// According to FHS 3.0, it is not necessary to have a subdir here (see note and reference above).
// If the binary has a `docker-` prefix, let's look it up without the dir prefix.
if strings.HasPrefix("docker-", binary) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has the arguments flipped;

Suggested change
if strings.HasPrefix("docker-", binary) {
if strings.HasPrefix(binary, "docker-") {

@@ -136,6 +145,16 @@ func (conf *Config) LookupInitPath() (string, error) {
return exec.LookPath(binary)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fallback means we will look in $PATH, so this would also include, e.g. docker-compose 🤔 😂

cp /usr/libexec/docker/cli-plugins/docker-compose /usr/local/bin
dockerd --init-path=docker-compose
...
WARN[2024-05-10T13:16:18.581826096Z] failed to parse /usr/local/bin/docker-compose version  error="unknown output format: Docker Compose version v2.25.0\n"


docker info | grep Init
 Init Binary: docker-hello

docker run -dit --init busybox
dac20108102f70578ed24d0ba5952bb874130d14882952e37dfbfb8bc19b4e5a

docker ps -a
CONTAINER ID   IMAGE     COMMAND   CREATED          STATUS                        PORTS     NAMES
dac20108102f   busybox   "sh"      59 seconds ago   Exited (16) 58 seconds ago              relaxed_boyd

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, but they could also have done --init-path=/usr/libexec/docker/cli-plugins/docker-compose.
I'm not understanding the concern here. We aren't resolving the wrong binaries except that the user potentially put in the wrong binary.

@thaJeztah
Copy link
Member

When a proxy path is specified int he config, this still requires it to be absolute path.

Correct, this PR is not changing the absolute path, but it looks like that already happened in 6caaa8c.

That changed oci_linux.go to use LookupInitPath()

path, err := daemonCfg.LookupInitPath() // this will fall back to DefaultInitBinary and return an absolute path

Which uses GetInitPath internally (which can be either user-configured OR the default), and regardless where that came from will lookup the binary if it's not an absolute path

// LookupInitPath returns an absolute path to the "docker-init" binary by searching relevant "libexec" directories (per FHS 3.0 & 2.3) followed by PATH
func (conf *Config) LookupInitPath() (string, error) {
binary := conf.GetInitPath()
if filepath.IsAbs(binary) {
return binary, nil
}

Before that PR, it would only lookup if the value is empty, so only for the default;

moby/daemon/oci_linux.go

Lines 751 to 753 in 1855a55

path := daemon.configStore.InitPath
if path == "" {
path, err = exec.LookPath(dconfig.DefaultInitBinary)

cp /usr/local/bin/docker-init /usr/local/libexec/docker/hello
dockerd --init-path=hello

docker info | grep Init
 Init Binary: hello

docker run -dit --init busybox
e46854e0029156cdba0ec2d0ec8c9ba2df54da30abd86897fa63335e8a7492e2

ctr -n moby c info e46854e0029156cdba0ec2d0ec8c9ba2df54da30abd86897fa63335e8a7492e2 | grep hello
                "source": "/usr/local/libexec/docker/hello",

And with this PR, the above also works with /usr/local/libexec (if the init has a docker- prefix);

mv /usr/local/libexec/docker/hello /usr/local/libexec/docker-hello

dockerd --init-path=docker-hello

docker info | grep Init
 Init Binary: docker-hello

docker run -dit --init busybox
d001ed2baeed3b0fe1f1c83f56bcd3ec4ebeaad050f9192b28d85376e6e46694

ctr -n moby c info d001ed2baeed3b0fe1f1c83f56bcd3ec4ebeaad050f9192b28d85376e6e46694 | grep hello
                "source": "/usr/local/libexec/docker-hello",

@cpuguy83
Copy link
Member Author

@thaJeztah I get that it was changed, I'm just not sure I understand what the issue is with it.

@cpuguy83 cpuguy83 force-pushed the more_paths_docker_proxy branch from c1274dd to 45eb733 Compare May 10, 2024 16:02
@cpuguy83
Copy link
Member Author

Ping just want to understand what the concerns are with having a custom binary name, especially when it would be prefixed with docker- anyway.

This allows distros to put docker-proxy under libexec paths as is done
for docker-init.

Also expands the lookup to to not require a `docker/` subdir in libexec
subdir.
Since it is a generic helper that may be used for something else in the
future, this is only done for binaries with a `docker-`.

Signed-off-by: Brian Goff <[email protected]>
@cpuguy83 cpuguy83 force-pushed the more_paths_docker_proxy branch from 45eb733 to f8c088b Compare June 20, 2024 19:27
Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tianon tianon merged commit 418eed6 into moby:master Jun 20, 2024
126 checks passed
@tianon
Copy link
Member

tianon commented Jun 20, 2024

We discussed a few things related to this in today's maintainer call, but ultimately came to the conclusion that they're all orthogonal to this change. 👍

@corhere corhere added this to the 27.0.0 milestone Jun 20, 2024
@corhere corhere added kind/enhancement Enhancements are not bugs or new features but can improve usability or performance. impact/changelog area/daemon labels Jun 20, 2024
@cpuguy83 cpuguy83 deleted the more_paths_docker_proxy branch June 20, 2024 21:05
renovate bot added a commit to earthly/dind that referenced this pull request Jul 1, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [docker/docker](https://togithub.com/docker/docker) | major | `26.1.4`
-> `27.0.3` |

---

### Release Notes

<details>
<summary>docker/docker (docker/docker)</summary>

### [`v27.0.3`](https://togithub.com/moby/moby/releases/tag/v27.0.3)

[Compare
Source](https://togithub.com/docker/docker/compare/v27.0.2...v27.0.3)

#### 27.0.3

For a full list of pull requests and changes in this release, refer to
the relevant GitHub milestones:

- [docker/cli, 27.0.3
milestone](https://togithub.com/docker/cli/issues?q=is%3Aclosed+milestone%3A27.0.3)
- [moby/moby, 27.0.3
milestone](https://togithub.com/moby/moby/issues?q=is%3Aclosed+milestone%3A27.0.3)
- Deprecated and removed features, see [Deprecated
Features](https://togithub.com/docker/cli/blob/v27.0.3/docs/deprecated.md).
- Changes to the Engine API, see [API version
history](https://togithub.com/moby/moby/blob/v27.0.3/docs/api/version-history.md).

##### Bug fixes and enhancements

- Fix a regression that incorrectly reported a port mapping from a host
IPv6 address to an IPv4-only container as an error.
[moby/moby#48090](https://togithub.com/moby/moby/pull/48090)
- Fix a regression that caused duplicate subnet allocations when
creating networks.
[moby/moby#48089](https://togithub.com/moby/moby/pull/48089)
- Fix a regression resulting in "fail to register layer: failed to
Lchown" errors when trying to pull an image with rootless enabled on a
system that supports native overlay with user-namespaces.
[moby/moby#48086](https://togithub.com/moby/moby/pull/48086)

### [`v27.0.2`](https://togithub.com/moby/moby/releases/tag/v27.0.2)

[Compare
Source](https://togithub.com/docker/docker/compare/v27.0.1-rc.1...v27.0.2)

#### 27.0.2

For a full list of pull requests and changes in this release, refer to
the relevant GitHub milestones:

- [docker/cli, 27.0.2
milestone](https://togithub.com/docker/cli/issues?q=is%3Aclosed+milestone%3A27.0.2)
- [moby/moby, 27.0.2
milestone](https://togithub.com/moby/moby/issues?q=is%3Aclosed+milestone%3A27.0.2)
- Deprecated and removed features, see [Deprecated
Features](https://togithub.com/docker/cli/blob/v27.0.2/docs/deprecated.md).
- Changes to the Engine API, see [API version
history](https://togithub.com/moby/moby/blob/v27.0.2/docs/api/version-history.md).

##### Bug fixes and enhancements

- Fix a regression that caused port numbers to be ignored when parsing a
Docker registry URL.
[docker/cli#5197](https://togithub.com/docker/cli/pull/5197),
[docker/cli#5198](https://togithub.com/docker/cli/pull/5198)

##### Removed

- api/types: deprecate `ContainerJSONBase.Node` field and
`ContainerNode` type. These definitions were used by the standalone
("classic") Swarm API, but never implemented in the Docker Engine
itself. [moby/moby#48055](https://togithub.com/moby/moby/pull/48055)

### [`v27.0.1`](https://togithub.com/moby/moby/releases/tag/v27.0.1)

[Compare
Source](https://togithub.com/docker/docker/compare/v26.1.4...v27.0.1-rc.1)

#### 27.0.1

For a full list of pull requests and changes in this release, refer to
the relevant GitHub milestones:

- [docker/cli, 27.0.0
milestone](https://togithub.com/docker/cli/issues?q=is%3Aclosed+milestone%3A27.0.0)
- [moby/moby, 27.0.0
milestone](https://togithub.com/moby/moby/issues?q=is%3Aclosed+milestone%3A27.0.0)
- Deprecated and removed features, see [Deprecated
Features](https://togithub.com/docker/cli/blob/v27.0.1/docs/deprecated.md).
- Changes to the Engine API, see [API version
history](https://togithub.com/moby/moby/blob/v27.0.1/docs/api/version-history.md).

##### New

- containerd image store: Add `--platform` flag to `docker image push`
and improve the default behavior when not all platforms of the
multi-platform image are available locally.
[docker/cli#4984](https://togithub.com/docker/cli/pull/4984),
[moby/moby#47679](https://togithub.com/moby/moby/pull/47679)
- Add support to `docker stack deploy` for `driver_opts` in a service's
networks. [docker/cli#5125](https://togithub.com/docker/cli/pull/5125)
- Consider additional `/usr/local/libexec` and `/usr/libexec` paths when
looking up the userland proxy binaries by a name with a `docker-`
prefix. [moby/moby#47804](https://togithub.com/moby/moby/pull/47804)

##### Bug fixes and enhancements

- `*client.Client` instances are now always safe for concurrent use by
multiple goroutines. Previously, this could lead to data races when the
`WithAPIVersionNegotiation()` option is used.
[moby/moby#47961](https://togithub.com/moby/moby/pull/47961)
- Fix a bug causing the Docker CLI to leak Unix sockets in `$TMPDIR` in
some cases. [docker/cli#5146](https://togithub.com/docker/cli/pull/5146)
- Don't ignore a custom seccomp profile when used in conjunction with
`--privileged`.
[moby/moby#47500](https://togithub.com/moby/moby/pull/47500)
- rootless: overlay2: support native overlay diff when using
rootless-mode with Linux kernel version 5.11 and later.
[moby/moby#47605](https://togithub.com/moby/moby/pull/47605)
- Fix the `StartInterval` default value of healthcheck to reflect the
documented value of 5s.
[moby/moby#47799](https://togithub.com/moby/moby/pull/47799)
- Fix `docker save` and `docker load` not ending on the daemon side when
the operation was cancelled by the user, for example with
<kbd>Ctrl+C</kbd>.
[moby/moby#47629](https://togithub.com/moby/moby/pull/47629)
- The `StartedAt` property of containers is now recorded before
container startup, guaranteeing that the `StartedAt` is always before
`FinishedAt`.
[moby/moby#47003](https://togithub.com/moby/moby/pull/47003)
- The internal DNS resolver used by Windows containers on Windows now
forwards requests to external DNS servers by default. This enables
`nslookup` to resolve external hostnames. This behaviour can be disabled
via `daemon.json`, using `"features": { "windows-dns-proxy": false }`.
The configuration option will be removed in a future release.
[moby/moby#47826](https://togithub.com/moby/moby/pull/47826)
- Print a warning when the CLI does not have permissions to read the
configuration file.
[docker/cli#5077](https://togithub.com/docker/cli/pull/5077)
- Fix a goroutine and file-descriptor leak on container attach.
[moby/moby#45052](https://togithub.com/moby/moby/pull/45052)
- Clear the networking state of all stopped or dead containers during
daemon start-up.
[moby/moby#47984](https://togithub.com/moby/moby/pull/47984)
- Write volume options JSON atomically to avoid "invalid JSON" errors
after system crash.
[moby/moby#48034](https://togithub.com/moby/moby/pull/48034)
- Allow multiple macvlan networks with the same parent.
[moby/moby#47318](https://togithub.com/moby/moby/pull/47318)
- Allow BuildKit to be used on Windows daemons that advertise it.
[docker/cli#5178](https://togithub.com/docker/cli/pull/5178)

##### Networking

- Allow sysctls to be set per-interface during container creation and
network connection.
[moby/moby#47686](https://togithub.com/moby/moby/pull/47686)
- In a future release, this will be the only way to set per-interface
sysctl options.
For example, on the command line in a `docker run` command,`--network
mynet --sysctl net.ipv4.conf.eth0.log_martians=1` will be rejected.
Instead, you must use `--network
name=mynet,driver-opt=com.docker.network.endpoint.sysctls=net.ipv4.conf.IFNAME.log_martians=1`.

##### IPv6

- `ip6tables` is no longer experimental. You may remove the
`experimental` configuration option and continue to use IPv6, if it is
not required by any other features.
- `ip6tables` is now enabled for Linux bridge networks by default.
[moby/moby#47747](https://togithub.com/moby/moby/pull/47747)
- This makes IPv4 and IPv6 behaviors consistent with each other, and
reduces the risk that IPv6-enabled containers are inadvertently exposed
to the network.
- There is no impact if you are running Docker Engine with `ip6tables`
enabled (new default).
- If you are using an IPv6-enabled bridge network without `ip6tables`,
this is likely a breaking change. Only published container ports (`-p`
or `--publish`) are accessible from outside the Docker bridge network,
and outgoing connections masquerade as the host.
- To restore the behavior of earlier releases, no `ip6tables` at all,
set `"ip6tables": false` in `daemon.json`, or use the CLI option
`--ip6tables=false`. Alternatively, leave `ip6tables` enabled, publish
ports, and enable direct routing.
- With `ip6tables` enabled, if `ip6tables` is not functional on your
host, Docker Engine will start but it will not be possible to create an
IPv6-enabled network.

##### IPv6 network configuration improvements

- A Unique Local Address (ULA) base prefix is automatically added to
`default-address-pools` if this parameter wasn't manually configured, or
if it contains no IPv6 prefixes.
[moby/moby#47853](https://togithub.com/moby/moby/pull/47853)
- Prior to this release, to create an IPv6-enabled network it was
necessary to use the `--subnet` option to specify an IPv6 subnet, or add
IPv6 ranges to `default-address-pools` in `daemon.json`.
- Starting in this release, when a bridge network is created with
`--ipv6` and no IPv6 subnet is defined by those options, an IPv6 Unique
Local Address (ULA) base prefix is used.
- The ULA prefix is derived from the Engine host ID such that it's
unique across hosts and over time.
- IPv6 address pools of any size can now be added to
`default-address-pools`.
[moby/moby#47768](https://togithub.com/moby/moby/pull/47768)
- IPv6 can now be enabled by default on all custom bridge networks using
`"default-network-opts": { "bridge": {"com.docker.network.enable_ipv6":
"true"}}` in `daemon.json`, or `dockerd
--default-network-opt=bridge=com.docker.network.enable_ipv6=true`on the
comand line.
[moby/moby#47867](https://togithub.com/moby/moby/pull/47867)
- Direct routing for IPv6 networks, with `ip6tables` enabled.
[moby/moby#47871](https://togithub.com/moby/moby/pull/47871)
- Added bridge driver option
`com.docker.network.bridge.gateway_mode_ipv6=<nat|routed>`.
- The default behavior, `nat`, is unchanged from previous releases
running with `ip6tables` enabled. NAT and masquerading rules are set up
for each published container port.
- When set to `routed`, no NAT or masquerading rules are configured for
published ports. This enables direct IPv6 access to the container, if
the host's network can route packets for the container's address to the
host. Published ports will be opened in the container's firewall.
- When a port mapping only applies to `routed` mode, only addresses
`0.0.0.0` or `::` are allowed and a host port must not be given.
- Note that published container ports, in `nat` or `routed` mode, are
accessible from any remote address if routing is set up in the network,
unless the Docker host's firewall has additional restrictions. For
example: `docker network create --ipv6 -o
com.docker.network.bridge.gateway_mode_ipv6=routed mynet`.
- The option `com.docker.network.bridge.gateway_mode_ipv4=<nat|routed>`
is also available, with the same behavior but for IPv4.
- If firewalld is running on the host, Docker creates policy
`docker-forwarding` to allow forwarding from any zone to the `docker`
zone. This makes it possible to configure a bridge network with a
routable IPv6 address, and no NAT or masquerading.
[moby/moby#47745](https://togithub.com/moby/moby/pull/47745)
- When a port is published with no host port specified, or a host port
range is given, the same port will be allocated for IPv4 and IPv6.
[moby/moby#47871](https://togithub.com/moby/moby/pull/47871)
- For example `-p 80` will result in the same ephemeral port being
allocated for `0.0.0.0` and `::`, and `-p 8080-8083:80` will pick the
same port from the range for both address families.
- Similarly, ports published to specific addresses will be allocated the
same port. For example, `-p 127.0.0.1::80 -p '[::1]::80'`.
- If no port is available on all required addresses, container creation
will fail.
- Environment variable `DOCKER_ALLOW_IPV6_ON_IPV4_INTERFACE`, introduced
in release 26.1.1, no longer has any effect.
[moby/moby#47963](https://togithub.com/moby/moby/pull/47963)
- If IPv6 could not be disabled on an interface because of a read-only
`/proc/sys/net`, the environment variable allowed the container to start
anyway.
- In this release, if IPv4 cannot be disabled for an interface, IPv6 can
be explicitly enabled for the network simply by using `--ipv6` when
creating it. Other workarounds are to configure the OS to disable IPv6
by default on new interfaces, mount `/proc/sys/net` read-write, or use a
kernel with no IPv6 support.
- For IPv6-enabled bridge networks, do not attempt to replace the
bridge's kernel-assigned link local address with `fe80::1`.
[moby/moby#47787](https://togithub.com/moby/moby/pull/47787)

##### Removed

- Deprecate experimental GraphDriver plugins.
[moby/moby#48050](https://togithub.com/moby/moby/pull/48050),
[docker/cli#5172](https://togithub.com/docker/cli/pull/5172)
- pkg/archive: deprecate `NewTempArchive` and `TempArchive`. These types
were only used in tests and will be removed in the next release.
[moby/moby#48002](https://togithub.com/moby/moby/pull/48002)
- pkg/archive: deprecate `CanonicalTarNameForPath`
[moby/moby#48001](https://togithub.com/moby/moby/pull/48001)
- Deprecate pkg/dmesg. This package was no longer used, and will be
removed in the next release.
[moby/moby#47999](https://togithub.com/moby/moby/pull/47999)
- Deprecate `pkg/stringid.ValidateID` and `pkg/stringid.IsShortID`
[moby/moby#47995](https://togithub.com/moby/moby/pull/47995)
- runconfig: deprecate `SetDefaultNetModeIfBlank` and move
`ContainerConfigWrapper` to `api/types/container`
[moby/moby#48007](https://togithub.com/moby/moby/pull/48007)
- runconfig: deprecate `DefaultDaemonNetworkMode` and move to
`daemon/network`
[moby/moby#48008](https://togithub.com/moby/moby/pull/48008)
- runconfig: deprecate `opts.ConvertKVStringsToMap`. This utility is no
longer used, and will be removed in the next release.
[moby/moby#48016](https://togithub.com/moby/moby/pull/48016)
- runconfig: deprecate `IsPreDefinedNetwork`.
[moby/moby#48011](https://togithub.com/moby/moby/pull/48011)

##### API

- containerd image store: `POST /images/{name}/push` now supports a
`platform` parameter (JSON encoded OCI Platform type) that allows
selecting a specific platform-manifest from the multi-platform image.
This is experimental and may change in future API versions.
[moby/moby#47679](https://togithub.com/moby/moby/pull/47679)
- `POST /services/create` and `POST /services/{id}/update` now support
`OomScoreAdj`.
[moby/moby#47950](https://togithub.com/moby/moby/pull/47950)
- `ContainerList` api returns container annotations.
[moby/moby#47866](https://togithub.com/moby/moby/pull/47866)
- `POST /containers/create` and `POST /services/create` now take
`Options` as part of `HostConfig.Mounts.TmpfsOptions` allowing to set
options for tmpfs mounts.
[moby/moby#46809](https://togithub.com/moby/moby/pull/46809)
- The `Healthcheck.StartInterval` property is now correctly ignored when
updating a Swarm service using API versions less than v1.44.
[moby/moby#47991](https://togithub.com/moby/moby/pull/47991)
- `GET /events` now supports image `create` event that is emitted when a
new image is built regardless if it was tagged or not.
[moby/moby#47929](https://togithub.com/moby/moby/pull/47929)
- `GET /info` now includes a `Containerd` field containing information
about the location of the containerd API socket and containerd
namespaces used by the daemon to run containers and plugins.
[moby/moby#47239](https://togithub.com/moby/moby/pull/47239)
- Deprecate non-standard (config) fields in image inspect output. The
`Config` field returned by this endpoint (used for `docker image
inspect`) returned additional fields that are not part of the image's
configuration and not part of the [Docker Image Spec] and the [OCI Image
Spec]. These fields are never set (and always return the default value
for the type), but are not omitted in the response when left empty. As
these fields were not intended to be part of the image configuration
response, they are deprecated, and will be removed in the future API
versions.
- Deprecate the daemon flag `--api-cors-header` and the corresponding
`daemon.json` configuration option. These will be removed in the next
major release.
[moby/moby#45313](https://togithub.com/moby/moby/pull/45313)

The following deprecated fields are currently included in the API
response, but are not part of the underlying image's `Config`:
[moby/moby#47941](https://togithub.com/moby/moby/pull/47941)

-   `Hostname`
-   `Domainname`
-   `AttachStdin`
-   `AttachStdout`
-   `AttachStderr`
-   `Tty`
-   `OpenStdin`
-   `StdinOnce`
-   `Image`
-   `NetworkDisabled` (already omitted unless set)
-   `MacAddress` (already omitted unless set)
-   `StopTimeout` (already omitted unless set)

##### Go SDK changes

- Client API callback for the following functions now require a context
parameter. [moby/moby#47536](https://togithub.com/moby/moby/pull/47536)
    -   `client.RequestPrivilegeFunc`
    -   `client.ImageSearchOptions.AcceptPermissionsFunc`
    -   `image.ImportOptions.PrivilegeFunc`

- Remove deprecated aliases for Image types.
[moby/moby#47900](https://togithub.com/moby/moby/pull/47900)
    -   `ImageImportOptions`
    -   `ImageCreateOptions`
    -   `ImagePullOptions`
    -   `ImagePushOptions`
    -   `ImageListOptions`
    -   `ImageRemoveOptions`

- Introduce `Ulimit` type alias for `github.com/docker/go-units.Ulimit`.
The `Ulimit` type as used in the API is defined in a Go module that will
transition to a new location in future.
A type alias is added to reduce the friction that comes with moving the
type to a new location.
The alias makes sure that existing code continues to work, but its
definition may change in future.
Users are recommended to use this alias instead of the `units.Ulimit`
directly. [moby/moby#48023](https://togithub.com/moby/moby/pull/48023)

- Move and rename types, changing their import paths and exported names.
[moby/moby#47936](https://togithub.com/moby/moby/pull/47936),
[moby/moby#47873](https://togithub.com/moby/moby/pull/47873),
[moby/moby#47887](https://togithub.com/moby/moby/pull/47887),
[moby/moby#47882](https://togithub.com/moby/moby/pull/47882),
[moby/moby#47921](https://togithub.com/moby/moby/pull/47921),
[moby/moby#48040](https://togithub.com/moby/moby/pull/48040):

    -   Move the following types to `api/types/container`:
        -   `BlkioStatEntry`
        -   `BlkioStats`
        -   `CPUStats`
        -   `CPUUsage`
        -   `ContainerExecInspect`
        -   `ContainerPathStat`
        -   `ContainerStats`
        -   `ContainersPruneReport`
        -   `CopyToContainerOptions`
        -   `ExecConfig`
        -   `ExecStartCheck`
        -   `MemoryStats`
        -   `NetworkStats`
        -   `PidsStats`
        -   `StatsJSON`
        -   `Stats`
        -   `StorageStats`
        -   `ThrottlingData`
    -   Move the following types to `api/types/image`:
        -   `ImagesPruneReport`
        -   `ImageImportSource`
        -   `ImageLoadResponse`
    -   Move the `ExecStartOptions` type to `api/types/backend`.
    -   Move the `VolumesPruneReport` type to `api/types/volume`.
    -   Move the `EventsOptions` type to `api/types/events`.
    -   Move the `ImageSearchOptions` type to `api/types/registry`.
- Drop `Network` prefix and move the following types to
`api/types/network`:
        -   `NetworkCreateResponse`
        -   `NetworkConnect`
        -   `NetworkDisconnect`
        -   `NetworkInspectOptions`
        -   `EndpointResource`
        -   `NetworkListOptions`
        -   `NetworkCreateOptions`
        -   `NetworkCreateRequest`
        -   `NetworksPruneReport`
    -   Move `NetworkResource` to `api/types/network`.

##### Packaging updates

- Update Buildx to
[v0.15.1](https://togithub.com/docker/buildx/releases/tag/v0.15.1).
[docker/docker-ce-packaging#1029](https://togithub.com/docker/docker-ce-packaging/pull/1029)
- Update BuildKit to
[v0.14.1](https://togithub.com/moby/buildkit/releases/tag/v0.14.1).
[moby/moby#48028](https://togithub.com/moby/moby/pull/48028)
- Update runc to
[v1.1.13](https://togithub.com/opencontainers/runc/releases/tag/v1.1.13)
[moby/moby#47976](https://togithub.com/moby/moby/pull/47976)
- Update Compose to
[v2.28.1](https://togithub.com/docker/compose/releases/tag/v2.28.1).
[moby/docker-ce-packaging#1032](https://togithub.com/docker/docker-ce-packaging/pull/1032)

[Docker image spec]:
https://togithub.com/moby/docker-image-spec/blob/v1.3.1/specs-go/v1/image.go#L19-L32

[OCI Image Spec]:
https://togithub.com/opencontainers/image-spec/blob/v1.1.0/specs-go/v1/config.go#L24-L62

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "after 6am on monday" (UTC), Automerge
- At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/earthly/dind).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MjEuMCIsInVwZGF0ZWRJblZlciI6IjM3LjQyMS4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJyZW5vdmF0ZSJdfQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
renovate bot added a commit to earthly/dind that referenced this pull request Jul 1, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [docker/docker](https://togithub.com/docker/docker) | major | `26.1.4`
-> `27.0.3` |

---

### Release Notes

<details>
<summary>docker/docker (docker/docker)</summary>

### [`v27.0.3`](https://togithub.com/moby/moby/releases/tag/v27.0.3)

[Compare
Source](https://togithub.com/docker/docker/compare/v27.0.2...v27.0.3)

#### 27.0.3

For a full list of pull requests and changes in this release, refer to
the relevant GitHub milestones:

- [docker/cli, 27.0.3
milestone](https://togithub.com/docker/cli/issues?q=is%3Aclosed+milestone%3A27.0.3)
- [moby/moby, 27.0.3
milestone](https://togithub.com/moby/moby/issues?q=is%3Aclosed+milestone%3A27.0.3)
- Deprecated and removed features, see [Deprecated
Features](https://togithub.com/docker/cli/blob/v27.0.3/docs/deprecated.md).
- Changes to the Engine API, see [API version
history](https://togithub.com/moby/moby/blob/v27.0.3/docs/api/version-history.md).

##### Bug fixes and enhancements

- Fix a regression that incorrectly reported a port mapping from a host
IPv6 address to an IPv4-only container as an error.
[moby/moby#48090](https://togithub.com/moby/moby/pull/48090)
- Fix a regression that caused duplicate subnet allocations when
creating networks.
[moby/moby#48089](https://togithub.com/moby/moby/pull/48089)
- Fix a regression resulting in "fail to register layer: failed to
Lchown" errors when trying to pull an image with rootless enabled on a
system that supports native overlay with user-namespaces.
[moby/moby#48086](https://togithub.com/moby/moby/pull/48086)

### [`v27.0.2`](https://togithub.com/moby/moby/releases/tag/v27.0.2)

[Compare
Source](https://togithub.com/docker/docker/compare/v27.0.1-rc.1...v27.0.2)

#### 27.0.2

For a full list of pull requests and changes in this release, refer to
the relevant GitHub milestones:

- [docker/cli, 27.0.2
milestone](https://togithub.com/docker/cli/issues?q=is%3Aclosed+milestone%3A27.0.2)
- [moby/moby, 27.0.2
milestone](https://togithub.com/moby/moby/issues?q=is%3Aclosed+milestone%3A27.0.2)
- Deprecated and removed features, see [Deprecated
Features](https://togithub.com/docker/cli/blob/v27.0.2/docs/deprecated.md).
- Changes to the Engine API, see [API version
history](https://togithub.com/moby/moby/blob/v27.0.2/docs/api/version-history.md).

##### Bug fixes and enhancements

- Fix a regression that caused port numbers to be ignored when parsing a
Docker registry URL.
[docker/cli#5197](https://togithub.com/docker/cli/pull/5197),
[docker/cli#5198](https://togithub.com/docker/cli/pull/5198)

##### Removed

- api/types: deprecate `ContainerJSONBase.Node` field and
`ContainerNode` type. These definitions were used by the standalone
("classic") Swarm API, but never implemented in the Docker Engine
itself. [moby/moby#48055](https://togithub.com/moby/moby/pull/48055)

### [`v27.0.1`](https://togithub.com/moby/moby/releases/tag/v27.0.1)

[Compare
Source](https://togithub.com/docker/docker/compare/v26.1.4...v27.0.1-rc.1)

#### 27.0.1

For a full list of pull requests and changes in this release, refer to
the relevant GitHub milestones:

- [docker/cli, 27.0.0
milestone](https://togithub.com/docker/cli/issues?q=is%3Aclosed+milestone%3A27.0.0)
- [moby/moby, 27.0.0
milestone](https://togithub.com/moby/moby/issues?q=is%3Aclosed+milestone%3A27.0.0)
- Deprecated and removed features, see [Deprecated
Features](https://togithub.com/docker/cli/blob/v27.0.1/docs/deprecated.md).
- Changes to the Engine API, see [API version
history](https://togithub.com/moby/moby/blob/v27.0.1/docs/api/version-history.md).

##### New

- containerd image store: Add `--platform` flag to `docker image push`
and improve the default behavior when not all platforms of the
multi-platform image are available locally.
[docker/cli#4984](https://togithub.com/docker/cli/pull/4984),
[moby/moby#47679](https://togithub.com/moby/moby/pull/47679)
- Add support to `docker stack deploy` for `driver_opts` in a service's
networks. [docker/cli#5125](https://togithub.com/docker/cli/pull/5125)
- Consider additional `/usr/local/libexec` and `/usr/libexec` paths when
looking up the userland proxy binaries by a name with a `docker-`
prefix. [moby/moby#47804](https://togithub.com/moby/moby/pull/47804)

##### Bug fixes and enhancements

- `*client.Client` instances are now always safe for concurrent use by
multiple goroutines. Previously, this could lead to data races when the
`WithAPIVersionNegotiation()` option is used.
[moby/moby#47961](https://togithub.com/moby/moby/pull/47961)
- Fix a bug causing the Docker CLI to leak Unix sockets in `$TMPDIR` in
some cases. [docker/cli#5146](https://togithub.com/docker/cli/pull/5146)
- Don't ignore a custom seccomp profile when used in conjunction with
`--privileged`.
[moby/moby#47500](https://togithub.com/moby/moby/pull/47500)
- rootless: overlay2: support native overlay diff when using
rootless-mode with Linux kernel version 5.11 and later.
[moby/moby#47605](https://togithub.com/moby/moby/pull/47605)
- Fix the `StartInterval` default value of healthcheck to reflect the
documented value of 5s.
[moby/moby#47799](https://togithub.com/moby/moby/pull/47799)
- Fix `docker save` and `docker load` not ending on the daemon side when
the operation was cancelled by the user, for example with
<kbd>Ctrl+C</kbd>.
[moby/moby#47629](https://togithub.com/moby/moby/pull/47629)
- The `StartedAt` property of containers is now recorded before
container startup, guaranteeing that the `StartedAt` is always before
`FinishedAt`.
[moby/moby#47003](https://togithub.com/moby/moby/pull/47003)
- The internal DNS resolver used by Windows containers on Windows now
forwards requests to external DNS servers by default. This enables
`nslookup` to resolve external hostnames. This behaviour can be disabled
via `daemon.json`, using `"features": { "windows-dns-proxy": false }`.
The configuration option will be removed in a future release.
[moby/moby#47826](https://togithub.com/moby/moby/pull/47826)
- Print a warning when the CLI does not have permissions to read the
configuration file.
[docker/cli#5077](https://togithub.com/docker/cli/pull/5077)
- Fix a goroutine and file-descriptor leak on container attach.
[moby/moby#45052](https://togithub.com/moby/moby/pull/45052)
- Clear the networking state of all stopped or dead containers during
daemon start-up.
[moby/moby#47984](https://togithub.com/moby/moby/pull/47984)
- Write volume options JSON atomically to avoid "invalid JSON" errors
after system crash.
[moby/moby#48034](https://togithub.com/moby/moby/pull/48034)
- Allow multiple macvlan networks with the same parent.
[moby/moby#47318](https://togithub.com/moby/moby/pull/47318)
- Allow BuildKit to be used on Windows daemons that advertise it.
[docker/cli#5178](https://togithub.com/docker/cli/pull/5178)

##### Networking

- Allow sysctls to be set per-interface during container creation and
network connection.
[moby/moby#47686](https://togithub.com/moby/moby/pull/47686)
- In a future release, this will be the only way to set per-interface
sysctl options.
For example, on the command line in a `docker run` command,`--network
mynet --sysctl net.ipv4.conf.eth0.log_martians=1` will be rejected.
Instead, you must use `--network
name=mynet,driver-opt=com.docker.network.endpoint.sysctls=net.ipv4.conf.IFNAME.log_martians=1`.

##### IPv6

- `ip6tables` is no longer experimental. You may remove the
`experimental` configuration option and continue to use IPv6, if it is
not required by any other features.
- `ip6tables` is now enabled for Linux bridge networks by default.
[moby/moby#47747](https://togithub.com/moby/moby/pull/47747)
- This makes IPv4 and IPv6 behaviors consistent with each other, and
reduces the risk that IPv6-enabled containers are inadvertently exposed
to the network.
- There is no impact if you are running Docker Engine with `ip6tables`
enabled (new default).
- If you are using an IPv6-enabled bridge network without `ip6tables`,
this is likely a breaking change. Only published container ports (`-p`
or `--publish`) are accessible from outside the Docker bridge network,
and outgoing connections masquerade as the host.
- To restore the behavior of earlier releases, no `ip6tables` at all,
set `"ip6tables": false` in `daemon.json`, or use the CLI option
`--ip6tables=false`. Alternatively, leave `ip6tables` enabled, publish
ports, and enable direct routing.
- With `ip6tables` enabled, if `ip6tables` is not functional on your
host, Docker Engine will start but it will not be possible to create an
IPv6-enabled network.

##### IPv6 network configuration improvements

- A Unique Local Address (ULA) base prefix is automatically added to
`default-address-pools` if this parameter wasn't manually configured, or
if it contains no IPv6 prefixes.
[moby/moby#47853](https://togithub.com/moby/moby/pull/47853)
- Prior to this release, to create an IPv6-enabled network it was
necessary to use the `--subnet` option to specify an IPv6 subnet, or add
IPv6 ranges to `default-address-pools` in `daemon.json`.
- Starting in this release, when a bridge network is created with
`--ipv6` and no IPv6 subnet is defined by those options, an IPv6 Unique
Local Address (ULA) base prefix is used.
- The ULA prefix is derived from the Engine host ID such that it's
unique across hosts and over time.
- IPv6 address pools of any size can now be added to
`default-address-pools`.
[moby/moby#47768](https://togithub.com/moby/moby/pull/47768)
- IPv6 can now be enabled by default on all custom bridge networks using
`"default-network-opts": { "bridge": {"com.docker.network.enable_ipv6":
"true"}}` in `daemon.json`, or `dockerd
--default-network-opt=bridge=com.docker.network.enable_ipv6=true`on the
comand line.
[moby/moby#47867](https://togithub.com/moby/moby/pull/47867)
- Direct routing for IPv6 networks, with `ip6tables` enabled.
[moby/moby#47871](https://togithub.com/moby/moby/pull/47871)
- Added bridge driver option
`com.docker.network.bridge.gateway_mode_ipv6=<nat|routed>`.
- The default behavior, `nat`, is unchanged from previous releases
running with `ip6tables` enabled. NAT and masquerading rules are set up
for each published container port.
- When set to `routed`, no NAT or masquerading rules are configured for
published ports. This enables direct IPv6 access to the container, if
the host's network can route packets for the container's address to the
host. Published ports will be opened in the container's firewall.
- When a port mapping only applies to `routed` mode, only addresses
`0.0.0.0` or `::` are allowed and a host port must not be given.
- Note that published container ports, in `nat` or `routed` mode, are
accessible from any remote address if routing is set up in the network,
unless the Docker host's firewall has additional restrictions. For
example: `docker network create --ipv6 -o
com.docker.network.bridge.gateway_mode_ipv6=routed mynet`.
- The option `com.docker.network.bridge.gateway_mode_ipv4=<nat|routed>`
is also available, with the same behavior but for IPv4.
- If firewalld is running on the host, Docker creates policy
`docker-forwarding` to allow forwarding from any zone to the `docker`
zone. This makes it possible to configure a bridge network with a
routable IPv6 address, and no NAT or masquerading.
[moby/moby#47745](https://togithub.com/moby/moby/pull/47745)
- When a port is published with no host port specified, or a host port
range is given, the same port will be allocated for IPv4 and IPv6.
[moby/moby#47871](https://togithub.com/moby/moby/pull/47871)
- For example `-p 80` will result in the same ephemeral port being
allocated for `0.0.0.0` and `::`, and `-p 8080-8083:80` will pick the
same port from the range for both address families.
- Similarly, ports published to specific addresses will be allocated the
same port. For example, `-p 127.0.0.1::80 -p '[::1]::80'`.
- If no port is available on all required addresses, container creation
will fail.
- Environment variable `DOCKER_ALLOW_IPV6_ON_IPV4_INTERFACE`, introduced
in release 26.1.1, no longer has any effect.
[moby/moby#47963](https://togithub.com/moby/moby/pull/47963)
- If IPv6 could not be disabled on an interface because of a read-only
`/proc/sys/net`, the environment variable allowed the container to start
anyway.
- In this release, if IPv4 cannot be disabled for an interface, IPv6 can
be explicitly enabled for the network simply by using `--ipv6` when
creating it. Other workarounds are to configure the OS to disable IPv6
by default on new interfaces, mount `/proc/sys/net` read-write, or use a
kernel with no IPv6 support.
- For IPv6-enabled bridge networks, do not attempt to replace the
bridge's kernel-assigned link local address with `fe80::1`.
[moby/moby#47787](https://togithub.com/moby/moby/pull/47787)

##### Removed

- Deprecate experimental GraphDriver plugins.
[moby/moby#48050](https://togithub.com/moby/moby/pull/48050),
[docker/cli#5172](https://togithub.com/docker/cli/pull/5172)
- pkg/archive: deprecate `NewTempArchive` and `TempArchive`. These types
were only used in tests and will be removed in the next release.
[moby/moby#48002](https://togithub.com/moby/moby/pull/48002)
- pkg/archive: deprecate `CanonicalTarNameForPath`
[moby/moby#48001](https://togithub.com/moby/moby/pull/48001)
- Deprecate pkg/dmesg. This package was no longer used, and will be
removed in the next release.
[moby/moby#47999](https://togithub.com/moby/moby/pull/47999)
- Deprecate `pkg/stringid.ValidateID` and `pkg/stringid.IsShortID`
[moby/moby#47995](https://togithub.com/moby/moby/pull/47995)
- runconfig: deprecate `SetDefaultNetModeIfBlank` and move
`ContainerConfigWrapper` to `api/types/container`
[moby/moby#48007](https://togithub.com/moby/moby/pull/48007)
- runconfig: deprecate `DefaultDaemonNetworkMode` and move to
`daemon/network`
[moby/moby#48008](https://togithub.com/moby/moby/pull/48008)
- runconfig: deprecate `opts.ConvertKVStringsToMap`. This utility is no
longer used, and will be removed in the next release.
[moby/moby#48016](https://togithub.com/moby/moby/pull/48016)
- runconfig: deprecate `IsPreDefinedNetwork`.
[moby/moby#48011](https://togithub.com/moby/moby/pull/48011)

##### API

- containerd image store: `POST /images/{name}/push` now supports a
`platform` parameter (JSON encoded OCI Platform type) that allows
selecting a specific platform-manifest from the multi-platform image.
This is experimental and may change in future API versions.
[moby/moby#47679](https://togithub.com/moby/moby/pull/47679)
- `POST /services/create` and `POST /services/{id}/update` now support
`OomScoreAdj`.
[moby/moby#47950](https://togithub.com/moby/moby/pull/47950)
- `ContainerList` api returns container annotations.
[moby/moby#47866](https://togithub.com/moby/moby/pull/47866)
- `POST /containers/create` and `POST /services/create` now take
`Options` as part of `HostConfig.Mounts.TmpfsOptions` allowing to set
options for tmpfs mounts.
[moby/moby#46809](https://togithub.com/moby/moby/pull/46809)
- The `Healthcheck.StartInterval` property is now correctly ignored when
updating a Swarm service using API versions less than v1.44.
[moby/moby#47991](https://togithub.com/moby/moby/pull/47991)
- `GET /events` now supports image `create` event that is emitted when a
new image is built regardless if it was tagged or not.
[moby/moby#47929](https://togithub.com/moby/moby/pull/47929)
- `GET /info` now includes a `Containerd` field containing information
about the location of the containerd API socket and containerd
namespaces used by the daemon to run containers and plugins.
[moby/moby#47239](https://togithub.com/moby/moby/pull/47239)
- Deprecate non-standard (config) fields in image inspect output. The
`Config` field returned by this endpoint (used for `docker image
inspect`) returned additional fields that are not part of the image's
configuration and not part of the [Docker Image Spec] and the [OCI Image
Spec]. These fields are never set (and always return the default value
for the type), but are not omitted in the response when left empty. As
these fields were not intended to be part of the image configuration
response, they are deprecated, and will be removed in the future API
versions.
- Deprecate the daemon flag `--api-cors-header` and the corresponding
`daemon.json` configuration option. These will be removed in the next
major release.
[moby/moby#45313](https://togithub.com/moby/moby/pull/45313)

The following deprecated fields are currently included in the API
response, but are not part of the underlying image's `Config`:
[moby/moby#47941](https://togithub.com/moby/moby/pull/47941)

-   `Hostname`
-   `Domainname`
-   `AttachStdin`
-   `AttachStdout`
-   `AttachStderr`
-   `Tty`
-   `OpenStdin`
-   `StdinOnce`
-   `Image`
-   `NetworkDisabled` (already omitted unless set)
-   `MacAddress` (already omitted unless set)
-   `StopTimeout` (already omitted unless set)

##### Go SDK changes

- Client API callback for the following functions now require a context
parameter. [moby/moby#47536](https://togithub.com/moby/moby/pull/47536)
    -   `client.RequestPrivilegeFunc`
    -   `client.ImageSearchOptions.AcceptPermissionsFunc`
    -   `image.ImportOptions.PrivilegeFunc`

- Remove deprecated aliases for Image types.
[moby/moby#47900](https://togithub.com/moby/moby/pull/47900)
    -   `ImageImportOptions`
    -   `ImageCreateOptions`
    -   `ImagePullOptions`
    -   `ImagePushOptions`
    -   `ImageListOptions`
    -   `ImageRemoveOptions`

- Introduce `Ulimit` type alias for `github.com/docker/go-units.Ulimit`.
The `Ulimit` type as used in the API is defined in a Go module that will
transition to a new location in future.
A type alias is added to reduce the friction that comes with moving the
type to a new location.
The alias makes sure that existing code continues to work, but its
definition may change in future.
Users are recommended to use this alias instead of the `units.Ulimit`
directly. [moby/moby#48023](https://togithub.com/moby/moby/pull/48023)

- Move and rename types, changing their import paths and exported names.
[moby/moby#47936](https://togithub.com/moby/moby/pull/47936),
[moby/moby#47873](https://togithub.com/moby/moby/pull/47873),
[moby/moby#47887](https://togithub.com/moby/moby/pull/47887),
[moby/moby#47882](https://togithub.com/moby/moby/pull/47882),
[moby/moby#47921](https://togithub.com/moby/moby/pull/47921),
[moby/moby#48040](https://togithub.com/moby/moby/pull/48040):

    -   Move the following types to `api/types/container`:
        -   `BlkioStatEntry`
        -   `BlkioStats`
        -   `CPUStats`
        -   `CPUUsage`
        -   `ContainerExecInspect`
        -   `ContainerPathStat`
        -   `ContainerStats`
        -   `ContainersPruneReport`
        -   `CopyToContainerOptions`
        -   `ExecConfig`
        -   `ExecStartCheck`
        -   `MemoryStats`
        -   `NetworkStats`
        -   `PidsStats`
        -   `StatsJSON`
        -   `Stats`
        -   `StorageStats`
        -   `ThrottlingData`
    -   Move the following types to `api/types/image`:
        -   `ImagesPruneReport`
        -   `ImageImportSource`
        -   `ImageLoadResponse`
    -   Move the `ExecStartOptions` type to `api/types/backend`.
    -   Move the `VolumesPruneReport` type to `api/types/volume`.
    -   Move the `EventsOptions` type to `api/types/events`.
    -   Move the `ImageSearchOptions` type to `api/types/registry`.
- Drop `Network` prefix and move the following types to
`api/types/network`:
        -   `NetworkCreateResponse`
        -   `NetworkConnect`
        -   `NetworkDisconnect`
        -   `NetworkInspectOptions`
        -   `EndpointResource`
        -   `NetworkListOptions`
        -   `NetworkCreateOptions`
        -   `NetworkCreateRequest`
        -   `NetworksPruneReport`
    -   Move `NetworkResource` to `api/types/network`.

##### Packaging updates

- Update Buildx to
[v0.15.1](https://togithub.com/docker/buildx/releases/tag/v0.15.1).
[docker/docker-ce-packaging#1029](https://togithub.com/docker/docker-ce-packaging/pull/1029)
- Update BuildKit to
[v0.14.1](https://togithub.com/moby/buildkit/releases/tag/v0.14.1).
[moby/moby#48028](https://togithub.com/moby/moby/pull/48028)
- Update runc to
[v1.1.13](https://togithub.com/opencontainers/runc/releases/tag/v1.1.13)
[moby/moby#47976](https://togithub.com/moby/moby/pull/47976)
- Update Compose to
[v2.28.1](https://togithub.com/docker/compose/releases/tag/v2.28.1).
[moby/docker-ce-packaging#1032](https://togithub.com/docker/docker-ce-packaging/pull/1032)

[Docker image spec]:
https://togithub.com/moby/docker-image-spec/blob/v1.3.1/specs-go/v1/image.go#L19-L32

[OCI Image Spec]:
https://togithub.com/opencontainers/image-spec/blob/v1.1.0/specs-go/v1/config.go#L24-L62

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "after 6am on monday" (UTC), Automerge
- At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/earthly/dind).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MjEuMCIsInVwZGF0ZWRJblZlciI6IjM3LjQyMS4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJyZW5vdmF0ZSJdfQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/daemon docs/revisit impact/changelog kind/enhancement Enhancements are not bugs or new features but can improve usability or performance.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants