Some Guy
Some Guy

Reputation: 13578

Docker doesn't install correct on Mac

I have a pretty fresh Macbook Pro. Just downloaded the Docker installer and ran it. Then I opened the quickstart app, which had some errors.

I'd show you what it said but it doesn't make the same errors the second time around. Here's what it shows the second time I open the quickstart app:

Machine default already exists in VirtualBox.
Starting machine default...
exit status 1
Started machines may have new IP addresses. You may need to re-run the `docker-machine env` command.
Setting environment variables for machine default...



                        ##         .
                  ## ## ##        ==
               ## ## ## ## ##    ===
           /"""""""""""""""""\___/ ===
      ~~~ {~~ ~~~~ ~~~ ~~~~ ~~~ ~ /  ===- ~~~
           \______ o           __/
             \    \         __/
              \____\_______/


host is not running
docker is configured to use the default machine with IP 
For help getting started, check out the docs at https://docs.docker.com

default is not running. Please start this with docker-machine start default
bash-3.2$ docker-machine env
Error: Expected either one machine name, or -u flag to unset the variables in the arguments.

And here's what happens when I try to run docker:

docker run hello-world
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?

I thought Docker was supposed to be really great (everyone seems to love it), but this is really confusing sice I followed all the instructions.

EDIT: I am using Mac OS 10.10.3 and VirtualBox 5.0.3

Upvotes: 4

Views: 2448

Answers (1)

Rico
Rico

Reputation: 61669

Just run from the your shell:

eval $(docker-machine env default)

or you can set the same on your .bash_profile file.

You can see env variables if you just run the docker-machine env default command:

$ docker-machine env default
export DOCKER_TLS_VERIFY="1"
export DOCKER_HOST="tcp://192.168.99.100:2376"
export DOCKER_CERT_PATH="/Users/user/.docker/machine/machines/default"
export DOCKER_MACHINE_NAME="default"
# Run this command to configure your shell:
# eval "$(docker-machine env default)"

Don't forget to start your docker-machine (aka boot2docker)

$ docker-machine start default

You can also checkout the docker-machine subcommand reference here

Upvotes: 6

Related Questions