1

In order to run docker container on Marathon, I install the dockerToolBox.

I start mesos-slave with

containerizers=docker,mesos --executor_registration_timeout=5mins

Then I post an App with docker container to Marathon.

And the mesos-slave told me :

I1218 16:16:18.569870 251678720 containerizer.cpp:1284] Executor for container '3ca60aeb-0a15-4b93-9ff2-b09c9aa4a610' has exited
I1218 16:16:18.569905 251678720 containerizer.cpp:1097] Destroying container '3ca60aeb-0a15-4b93-9ff2-b09c9aa4a610'
Failed to perform recovery: Collect failed: Failed to 'docker -H unix:///var/run/docker.sock ps -a': exit status = exited with status 1 stderr = Cannot connect to the Docker daemon. Is the docker daemon running on this host?

so i excute docker -H unix:///var/run/docker.sock ps -a on my mac , it told me the same error Cannot connect to the Docker daemon. Is the docker daemon running on this host?

then i excute docker-machine ssh default into the VM , and excute docker -H unix:///var/run/docker.sock ps -a , it works.

is it mean that it is impossible run docker containner on marathon with Mac Os beacause of Mac Os use the VM to run docker ???

KingOfSocket
  • 293
  • 5
  • 18
  • To run `docker -H unix:///var/run/docker.sock ps -a` in mac i think you need to use `export DOCKER_HOST=tcp://192.168.59.103:2375` then docker will figure out where the daemon is running. – V.G Dec 25 '15 at 21:42
  • I configured Docker Machine using `eval $(docker-machine env machine-name)` and all `DOCKER_*` variables are set. But still getting the same error. Any idea? – Arun Gupta Apr 04 '16 at 20:48
  • when running docker with marathon , it will request docker unix socket, like "docker -H unix:///var/run/docker.sock ps -a" , in mac os , we start the docker by VM , the `docker.sock` is in the VM , so , I think it is impossible to do that – KingOfSocket Jun 06 '16 at 08:16

0 Answers0