azurelinux
azurelinux copied to clipboard
moby-engine package should not include /etc/docker/daemon.json
Describe the bug https://github.com/microsoft/azurelinux/pull/8556 included a change that includes sane defaults in daemon.json. However, any consumer that deploys config using a configuration package now has a conflict.
file /etc/docker/daemon.json from install of azuredb-dataplane-common-0.0.19-1.cm2.noarch conflicts with file from package moby-engine-24.0.9-1.cm2.x86_64
To Reproduce Steps to reproduce the behavior:
- Create a package that deploys custom config using /etc/docker/daemon.json
- Try to install your package on a system where
- Scroll down to '....'
- See error
Expected behavior
Since docker does not have a drop-in system or any other kind of composability for its config, the moby-engine package should not 'own' /etc/docker/daemon.json
.
It might be a good idea to install a default in /etc/docker/daemon.json.default
and copy it to /etc/docker/daemon.json
in postinst if this file does not exist. That still achieves the goal of shipping sane defaults, while not taking ownership of the file.
For this specific binary, upstream does not seem to try to resolve it from libexec. For other ones, such as docker-init, it does look in /usr/libexec/docker/docker-init. Should be pretty easy to convince upstream to do the same for docker-proxy.
It may be reasonable to look for docker-*
binaries directly in /usr/libexec as well, but I don't think its currently doing this for any binary today.
Thanks for the report @paulmey! I'm looking into the appropriate fix here and will prioritize making sure that /etc/docker/daemon.json is no longer owned by the moby-engine package, be that some %post trickery or enlightening moby-engine to assume a default path to docker-proxy.
Opened this upstream: https://github.com/moby/moby/pull/47804
Upstream PR is merged.
ACK. Backporting the change into Azure Linux 2.0 now so we can drop the /etc/docker/daemon.json file.
The moby-engine-24.0.9-6.cm2.x86_64 package has just been published and no longer provides the /etc/docker/daemon.json
file.