I am beginner to Docker. When i insert the following cmd it shows that it is stopped.
cmd: sudo service docker status
output: “docker stop/waiting”
But when i enter following command
cmd: docker version
output:
lient version: 1.6.2
Client API version: 1.18
Go version (client): go1.4.2
Git commit (client): 7c8fca2
OS/Arch (client): linux/amd64
FATA[0000] Get http:///var/run/docker.sock/v1.18/version: dial unix /var/run/docker.sock: permission denied. Are you trying to connect to a TLS-enabled daemon without TLS?
Previously i enter the following command to let the docker to listen to the port 2375
sudo docker -H tcp://0.0.0.0:2375 -d
Now I start the docker with “sudo service docker start” command and it gives the output "docker start/running, process 19408"
Now problem arises when I tried to run an ubuntu image using command “sudo docker --tlsverify=false run ubuntu”. It gives following output:
FATA[0000] Cannot connect to the Docker daemon. Is ‘docker -d’ running on this host?
I have tried searching many articles. But unable to restore docker to listen to the socket instead of tcp port.
Please help me.
This is also a handy place to tweak where Docker’s temporary files go.
#export TMPDIR="/mnt/bigdrive/docker-tmp"
After saving above file, I restart docker.
cmd: sudo service docker restart
output:
stop: Unknown instance:
docker start/running, process 21285
After this I tested running following command:
cmd: sudo docker --tlsverify=false run ubuntu
Output:
FATA[0000] Cannot connect to the Docker daemon. Is ‘docker -d’ running on this host?
Problem still exist.
May be I am missing something.
Hi Sabin,
Thank you for your response. In my first post, I have mentioned that when I checked for the status it is showing stopped, but at the same time when I checked for docker version it is giving the result. Still again I tried the same and below is the result.
funlab@funlab-Docker-PC:~$ sudo service docker status
docker stop/waiting
funlab@funlab-Docker-PC:~$ sudo docker run ubuntu
FATA[0000] Cannot connect to the Docker daemon. Is ‘docker -d’ running on this host?
Without using ‘sudo’ I got the following result.
funlab@funlab-Docker-PC:~$ docker run ubuntu
FATA[0000] Post http:///var/run/docker.sock/v1.18/containers/create: dial unix /var/run/docker.sock: permission denied. Are you trying to connect to a TLS-enabled daemon without TLS?
I am trying to use the docker-py APi and i have set the Docker_opts for tcp. after that i need to restart the sevices for the changes to show, but i am unable to do so.