Just installed docker for OSX. Previously used docker with docker-machine and VirtualBox.
[art@213:~]% docker -v
Docker version 1.11.1, build 5604cbe
[art@213:~]% docker ps
An error occurred trying to connect: Get http://localhost:4243/v1.23/containers/json: EOF
[art@213:~]% curl http://localhost:4243/v1.23/containers/json
curl: (52) Empty reply from server
tjamet
(Tjamet)
May 19, 2016, 11:12am
2
Hi,
From what I’ve read so far, you cannot reach the moby host (i.e. the docker host - linux -) from your mac OS.
The only way to reach moby is to use the default socket /var/run/docker.sock
that seems to be available in r/w for anybody
to do so, unset DOCKER_*
environment variables, then docker ps
and any other command will work properly.
I’ve also seen a few subjects dealing with reaching containers from your mac host, which is not possible for now, if you need to follow them:
Expected behavior
When launching a container which has HostConfig.NetworkMode=default (which ends up using the bridged network), I can connect to exposed ports via the container’s IP address.
Actual behavior
The container appears to be using the bridged network but the IP address cannot be connected to from the host.
"NetworkSettings": {
"Bridge": "",
"SandboxID": "f0638e5bd88c370e6128bde1b35b173cb96d7644fb2719e2bd02785a6f197fbd",
"HairpinMode": fals…
In the latest betas, it is possible to map a port on the host, to a port on the container. I’m not 100% sure what’s happening underneath, but that’s how it appears. This is cool, because it works the same way that Docker works on Linux hosts.
However, on Linux it is also possible to access a container by IP address, removing the need for port mapping. This is handy if you want to run multiple projects at once, and have host entries for them.
Is there a plan to add this feature? I imagine somet…
Also having this issue and would definitely appreciate if it would be solved so that developing with Docker would be consistent on any platform including OS X. Keep up the good work!
Oh, thank you. I found one of my configs was setting DOCKER_HOST env variable.