Error AtlasError Documentation and Resolution

Docker daemon failed to start because daemon.json conflicts with startup flags

unable to configure the Docker daemon with file /etc/docker/daemon.json: the following directives are specified both as a flag and in the configuration file: hosts

Docker found the same daemon setting in both daemon.json and startup flags, causing the daemon to fail during startup because the configuration sources conflict.

unable to configure the Docker daemon with file /etc/docker/daemon.jsondaemon
unable to configure the Docker daemon with file /etc/docker/daemon.json: the following directives are specified both as a flag and in the configuration file: hosts
  • The hosts setting is defined both in daemon.json and in dockerd startup flags.
  • The operating system service manager adds a default -H flag that conflicts with the daemon.json hosts entry.
  • Manual daemon startup arguments do not match the configuration file.
  1. Remove duplicate settings so the option is defined in only one place.
  2. On systemd-based Linux systems, override the service definition if the default -H flag conflicts with daemon.json.
  3. Restart the Docker service after updating the conflicting daemon configuration.
Docker Docs: Troubleshooting the Docker daemon
unable to configure the Docker daemon with file /etc/docker/daemon.json: fixes | Error Atlas