unable to configure the Docker daemon with file /etc/docker/daemon.json: EOF

Viewed 31280

I am new to docker and cannot understand these errors. So, Please let me know if any more information is needed.

`$ docker --version`
Docker version 1.12.6, build 88a4867/1.12.6

`$ docker info`
 Cannot connect to the Docker daemon. Is the docker daemon running on this host?

`$sudo dockerd`

FATA[0000] unable to configure the Docker daemon with file /etc/docker/daemon.json: EOF

`$sudo systemctl start docker`

Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details.

`$sudo systemctl status docker.service -l`

ā— docker.service - Docker Application Container Engine
   Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Wed 2017-07-26 14:30:21 EDT; 8min ago
  Docs: http://docs.docker.com

  Process: 5835 ExecStart=/usr/bin/dockerd-current --add-runtime docker-runc=/usr/libexec/docker/docker-runc-current --default-runtime=docker-runc --authorization-plugin=rhel-push-plugin --exec-opt native.cgroupdriver=systemd --userland-proxy-path=/usr/libexec/docker/docker-proxy-current $OPTIONS $DOCKER_STORAGE_OPTIONS $DOCKER_NETWORK_OPTIONS $ADD_REGISTRY $BLOCK_REGISTRY $INSECURE_REGISTRY (code=exited, status=1/FAILURE)
 Main PID: 5835 (code=exited, status=1/FAILURE)

Jul 26 14:30:21: Starting Docker Application Container Engine...
Jul 26 14:30:21 dockerd-current[5835]: time="2017-07-26T14:30:21-04:00" level=fatal msg="unable to configure the Docker daemon with file /etc/docker/daemon.json: EOF\n"
Jul 26 14:30:21 systemd[1]: docker.service: main process exited, code=exited, status=1/FAILURE
Jul 26 14:30:21 systemd[1]: Failed to start Docker Application Container Engine.
Jul 26 14:30:21 systemd[1]: Unit docker.service entered failed state.
Jul 26 14:30:21 systemd[1]: docker.service failed.

Please let me know if I need to check anything else.

4 Answers

I have same problem. But I am edited the file /etc/docker/daemon.json and added to it some options. If string with option is not last it have to end with comma character(,).

In root user, type :

$ nano /etc/docker/daemon.json

Ff the file show blank or nothing text, then you just add :

{
}

then save and exit.

Then try to restart docker using

$ service docker restart

In my case just remove that's file using this command $sudo rm /etc/docker/daemon.json

and then restar the service $sudo systemctl restart docker.service $sudo systemctl status docker.service

Related