Problem: I am trying to run docker inside vagrant, my Vagrantfile contains following:-
config.vm.provision "docker" do |d|
d.run "ubuntu",
cmd: "bash -l",
args: "-v '/vagrant:/var/www'"
end
docker gets installed but when I run any command it gives the error below:-
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
I have tried
https://docs.oracle.com/cd/E52668_01/E75728/html/section_rdz_hmw_2q.html
logged in as
root
into vagrant and started docker still same problem.tried
chmod on /var/run/docker.sock
file
nothing seems to work.
output of ps -ef
is
/usr/bin/dockerd
docker-containerd -l unix:///var/run/docker/libcontainerd/docker-containerd.sock --metrics-interval=0 --start-timeout 2m --state-dir
/var/run/docker/libcontainerd/containerd --shim docker-containerd-shim --runtime docker-runc