Reputation: 351
I have installed docker engine v1.12.3 on Ubuntu 14.04 LTS and since after the following changes to enable Remote API, I'm not able to pull
or run
any of the docker images,
/etc/default/docker
.Following is the error received,
docker: Cannot connect to the Docker daemon. Is the docker daemon running on this host?
Note: I have added login in user to the docker group
Upvotes: 0
Views: 1415
Reputation: 1028
@mustaccio is correct. The docker command defaults to using a unix socket normally at /var/run/docker.sock. You can either make your options setup like:
DOCKER_OPTS="-H tcp://127.0.0.1:2375" -H unix:///var/run/docker.sock"
and restart, or always use docker -H tcp://127.0.0.1:2375 whenever you interact with the host from the command line.
The only good scenario I've seen for removing the socket is pure user security. If your Docker host is TLS enabled, you can ensure only authorized people are accessing the host by signed certificates, not just people with access to the system.
Upvotes: 1
Reputation: 18945
If you configure the docker daemon to listen to a TCP socket (as you do), you should use the -H
command line option with the docker
command to point it to that socket instead of the default Unix socket.
Upvotes: 2