0

I'm new to docker and trying to run this project on OS X 10.10. Docker is installed through brew and looks good in the basics:

➜  docker-riak git:(develop) docker -v
Docker version 1.6.2, build 7c8fca2
➜  docker-riak git:(develop) boot2docker -v
Boot2Docker-cli version: v1.6.2
Git commit: cb2c3bc

Here's the error:

➜  docker-riak git:(develop) DOCKER_RIAK_AUTOMATIC_CLUSTERING=1 DOCKER_RIAK_CLUSTER_SIZE=5 DOCKER_RIAK_BACKEND=leveldb make start-cluster
./bin/start-cluster.sh
time="2015-06-06T11:21:19-04:00" level=fatal msg="Cannot connect to the Docker daemon. Is 'docker -d' running on this host?"

Bringing up cluster nodes:

make: *** [start-cluster] Error 1

I found this thread that recommends sudo docker -d, but this returns an error:

➜  docker-riak git:(develop) docker -d
2015/06/06 11:18:21 This is a client-only binary - running the Docker daemon is not supported.

What needs to happen here?

Community
  • 1
  • 1
mbb
  • 3,052
  • 1
  • 27
  • 28

1 Answers1

2

Run the full docker version command, and you should see something like this:

$ docker version Client version: 1.6.2 Client API version: 1.18 Go version (client): go1.4.2 Git commit (client): 7c8fca2 OS/Arch (client): darwin/amd64 Server version: 1.6.2 Server API version: 1.18 Go version (server): go1.4.2 Git commit (server): 7c8fca2 OS/Arch (server): linux/amd64

If you don't see all of that, you probably have issues with the connection to boot2docker. Check that you've added the right exports, like this:

export DOCKER_HOST=tcp://192.168.59.103:2376 export DOCKER_CERT_PATH=/Users/<yourusername>/.boot2docker/certs/boot2docker-vm export DOCKER_TLS_VERIFY=1

See if that helps.

  • Thanks. I rain `boot2docker shellinit` and confirmed the export occurred, but I still error out on `docker version` - `client version: 1.6.2 Client API version: 1.18 Go version (client): go1.4.2 Git commit (client): 7c8fca2 OS/Arch (client): darwin/amd64 FATA[0000] Cannot connect to the Docker daemon. Is 'docker -d' running on this host?` – mbb Jun 06 '15 at 15:34
  • Run `export`, and you should see something like this: ` DOCKER_CERT_PATH=/Users/jonas/.boot2docker/certs/boot2docker-vm DOCKER_HOST=tcp://192.168.59.103:2376 DOCKER_TLS_VERIFY=1 ` – jonasrosland Jun 06 '15 at 15:35
  • What the hell? The `shellinit` export doesn't actually show in export. I ran manually and it works. Manually exporting each of these did it. I'd call that a feature request for boot2docker :) – mbb Jun 06 '15 at 15:40
  • I have the added the following in my .zshrc file, so after starting boot2docker I can just open a new terminal window and all the exports are correctly set automatically: `export DOCKER_HOST=tcp://$(boot2docker ip 2>/dev/null):2376 export DOCKER_CERT_PATH=/Users/$USER/.boot2docker/certs/boot2docker-vm export DOCKER_TLS_VERIFY=1` – jonasrosland Jun 06 '15 at 15:42