2

I have been trying to run "hello-world" on docker in ubuntu and it wont work at all.

 Eddie@MACH1:~$ docker run hello-world
 docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?.
 See 'docker run --help'.
 Eddie@MACH1:~$ sudo service docker status
 sudo: unable to resolve host MACH1
 initctl: Unable to connect to Upstart: Failed to connect to socket  /com/ubuntu/upstart: Connection refused
 * Docker is not running
 Eddie@MACH1:~$

When I tried to check the status of docker all it tells me is that I am unable to connect to Upstart and that Docker isn't running. I have have literally tried every solution I could find on forums and nothing has worked, please help! Thank you.

Eddie White
  • 327
  • 2
  • 4
  • 10
  • ```Here is the solution of your problem.``` Check this out [Solution](http://stackoverflow.com/questions/21871479/docker-cant-connect-to-docker-daemon/38157703#38157703) – nPcomp Jan 21 '17 at 02:50
  • It doesn't appear that Upstart is configured on your system, are you sure you aren't running systemd? `sudo systemctl status docker` – BMitch Jan 21 '17 at 03:30
  • 1
    @sonyvizio, Note the sudo commands above, your linked answer doesn't apply. – BMitch Jan 21 '17 at 03:31
  • @bmitch when I try to use Use systemd commands I get "sudo: systemctl: command not found" and when i try to use upstart commands I get "Unable to connect to Upstart" – Eddie White Jan 21 '17 at 16:12
  • @BMitch, He is not using the docker command with sudo. If the user not in the docker group "docker run hello-world" will not run properly. – nPcomp Jan 22 '17 at 04:50

1 Answers1

1

I had a similar issue and (re)installed the Docker app on OSX. (https://docs.docker.com/engine/getstarted/step_one/#/docker-for-mac)

I was then able to run commands such as docker version, docker run hello-word, docker ps -a (without sudo).

You may not require the reinstall - it may be a matter of simply starting the app so the daemon is running and ready. In the Docker Mac app -> preferences, it also has a "Start Docker When You Login" option. If Docker was not started at the time you were running commands, this may help prevent that in the future.

Ben Morris
  • 377
  • 2
  • 12