为了在Marathon上运行docker容器, 我安装了dockerToolBox。
我用
启动mesos-slave containerizers=docker,mesos --executor_registration_timeout=5mins
然后我将带有docker容器的App发布到Marathon。
而mesos-slave告诉我:
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?
所以我在我的Mac上执行docker -H unix:///var/run/docker.sock ps -a
,它告诉我同样的错误
Cannot connect to the Docker daemon. Is the docker daemon running on this host?
然后我将docker-machine ssh default
执行到VM中,
并执行docker -H unix:///var/run/docker.sock ps -a
,它有效。
是不是因为Mac Os使用VM运行docker而无法在Mac OS的马拉松上运行docker containsner?