I'm setting up Docker on my local Mac OS X machine and am running into some issues getting it to work. I have followed the installation instructions at https://docs.docker.com/installation/mac/. Everything up to installing the boot2docker tool appears to go smoothly, but after the VM is running, Docker commands seems to do nothing. E.g.,
$ docker run ubuntu echo hello world
2014/06/17 08:20:54 Post http://localhost:4243/v1.12/containers/create: EOF
Every command ends in EOF and doesn't seem to do what it actually should do. Here's another:
$ docker ps
2014/06/17 08:25:10 Get http://localhost:4243/v1.12/containers/json: EOF
The VM created by the boot2docker tool is running as well:
$ boot2docker status
[2014-06-17 08:26:24] boot2docker-vm is running.
I have a feeling something is not set up correctly, but I followed the instructions line by line and can't see where something is going wrong.
Any help is much appreciated, thanks!
Update 1
boot2docker version: 1.0.0 or 0.9.1 (not sure--there's no version flag AFAICT)
$ boot2docker ip
Usage /usr/local/bin/boot2docker {init|start|up|save|pause|stop|restart|status|info|delete|ssh|download}
On the boot2docker instance:
$ sudo netstat -ntpl | grep docker
tcp 0 0 :::2375 :::* LISTEN 743/docker
$ docker --version
Docker version 1.0.0, build 63fe64c
Update 2
I just re-installed boot2docker and now I am definitely running 1.0.0.
$ boot2docker version
Client version: v1.0.0
Git commit: 2fef7b2
I also re-ran the command in the documentation (which conflicts with what the command told me to set the DOCKER_HOST on the command line, see below):
$ boot2docker up
2014/06/17 18:25:43 Waiting for VM to be started...
.............................
2014/06/17 18:26:41 Started.
2014/06/17 18:26:41 Auto detection of the VM's IP address.
2014/06/17 18:26:41 To connect the Docker client to the Docker daemon, please set:
2014/06/17 18:26:41 export DOCKER_HOST=tcp://:4243
But I am still seeing the original issue.
$ docker run ubuntu echo hello world
2014/06/17 18:28:29 Post http://127.0.0.1:4243/v1.12/containers/create: EOF
I then re-run the command mentioned in the documentation:
$ export DOCKER_HOST=tcp://$(boot2docker ip 2>/dev/null):2375
And now see this:
$ docker run ubuntu echo hello world
2014/06/17 18:31:39 Cannot connect to the Docker daemon. Is 'docker -d' running on this host?
I should mention that trying to run docker -d
on OS X shoots out this message:
$ docker -d
2014/06/17 18:34:04 The Docker daemon is only supported on linux
Which is not much help...