- First I have installed Docker on Windows 10 OS.
- Then I have created image of Ubuntu.
- Using
ubuntu
image I have installed docker using following commands on Ubuntu OS:
sudo apt update
sudo apt install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable"
sudo apt update
apt-cache policy docker-ce
sudo apt install docker-ce
It works fine till yet.
But when I run
docker info
command it gives me error:
Cannot connect to the Docker daemon at unix:///var/run/docker.sock.
Is the docker daemon running?
I have tried every possible solution through internet, but it does not work, it keeps on giving me same message.
Tried with following recommendation as well but no luck:
For Ubuntu 16.04
Inside file /lib/systemd/system/docker.service
change:
ExecStart=/usr/bin/dockerd fd://
with
ExecStart=/usr/bin/dockerd -H tcp://0.0.0.0:2375
Inside file /etc/init.d/docker
change:
DOCKER_OPTS=
with
DOCKER_OPTS="-H tcp://0.0.0.0:2375"
Please help me out and let me know if I am doing some thing wrong or its not possible.