Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 287
Aki Avatar asked Jul 26 '17 18:07

Aki


1 Answers

The file /etc/docker/daemon.json should not be present or if it is present then it should have a valid JSON object. A blank file would create an error. Either delete the file or if you want to have a blank file then have it with below content

{
}

This will create a blank json object

like image 125
Tarun Lalwani Avatar answered Oct 17 '22 20:10

Tarun Lalwani