参考链接:https://github.com/docker/for-mac/issues/770

For security reasons, we choose to not expose that port directly. However, as described in our FAQ you can run a socat container to redirect the Docker API exposed on the unix domain socket in Linux to the port of your choice on your OSX host:

docker run -d -v /var/run/docker.sock:/var/run/docker.sock -p 127.0.0.1:1234:1234 bobrik/socat TCP-LISTEN:1234,fork UNIX-CONNECT:/var/run/docker.sock

and then:

export DOCKER_HOST=tcp://localhost:1234

I am closing this issue now, but please let us know if you have further issues/questions.

Logo

权威|前沿|技术|干货|国内首个API全生命周期开发者社区

更多推荐