azurelinux icon indicating copy to clipboard operation
azurelinux copied to clipboard

moby-engine package should not include /etc/docker/daemon.json

Open paulmey opened this issue 10 months ago • 5 comments

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:

  1. Create a package that deploys custom config using /etc/docker/daemon.json
  2. Try to install your package on a system where
  3. Scroll down to '....'
  4. 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.

paulmey avatar Apr 30 '24 15:04 paulmey

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.

cpuguy83 avatar Apr 30 '24 16:04 cpuguy83

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.

hbeberman avatar May 07 '24 21:05 hbeberman

Opened this upstream: https://github.com/moby/moby/pull/47804

cpuguy83 avatar May 07 '24 22:05 cpuguy83

Upstream PR is merged.

cpuguy83 avatar Jun 20 '24 21:06 cpuguy83

ACK. Backporting the change into Azure Linux 2.0 now so we can drop the /etc/docker/daemon.json file.

hbeberman avatar Jun 25 '24 17:06 hbeberman

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.

hbeberman avatar Jul 18 '24 17:07 hbeberman