Reputation: 2468
I am trying to install new Docker on OSx.
It fails with following error.
Installation Failed.
Also the window opens where I can see two utilities:
When I click Docker Quick Terminal I can type:
docker info
But when I type:
docker run
I get the error.
sudo docker run -i -t ubuntu /bin/bash
Password:
Post http:///var/run/docker.sock/v1.20/containers/create: dial unix /var/run/docker.sock: no such file or directory.
* Are you trying to connect to a TLS-enabled daemon without TLS?
* Is your docker daemon up and running?
bash-4.3$
Upvotes: 11
Views: 4884
Reputation: 89
Check if vbox is running; if not, start it (replace default
with your vbox name):
$ docker-machine start default
And then do as Kevin above replied:
eval "$(docker-machine env default)"
Upvotes: 8
Reputation: 441
Just ran into the same thing. I did have a virtual machine running but was still getting that error when I tried to use the command line. When I ran docker-machine env default
to see the state of my docker VM named default I was prompted to run a command, eval "$(docker-machine env default)"
to initialize my shell. That step got everything working for me.
The details, as it turns out, are at the top of the README for docker/machine on github.
Upvotes: 13
Reputation: 61521
Docker just changed the way you install on Mac OS X and Windows. Now you install a Toolbox. They also changed the name of boot2docker
to docker-machine
Note: This release of Docker deprecates the Boot2Docker command line
in favor of Docker Machine. Use the Docker Toolbox to install Docker
Machine as well as the other Docker tools.
So remove any installation for boot2docker of you are installing from the Toolbox. Before you install make sure you stop any VirtualBox completely on your Mac OS X machine.
You can also remove the installation of VirtualBox if you have it and let the Docker Toolbox install it for you
Before you can run any container with
docker run -i -t ubuntu /bin/bash
you need to have your docker-machine running. Do a
ps -Af | grep VBox
and see if your Virtual Machine for docker-machine is running. You should see something like
VBoxHeadless docker-machine ...
Hope this helps.
Upvotes: 4