docker on OSX not returning container output through ssh,

I am running docker (v0.9.0) on OSX 10.9 using boot2docker (v0.6). Everything builds normally. I can use docker normally inside the TinyCore VM. However, within OSX I can issue commands to the docker deamon, but I am not receiving any output. Nor can I retrieve information about containers or processes. For example, I can run from OSX:

docker run -d ubuntu /bin/sh -c "while true; do echo hello world; sleep 1; done"

I do get a container ID back, but running docker ps or docker images returns an empty list. If I ssh into TinyCore VM instance and run docker ps, I can see that the container was indeed started and is running, and docker logs returns the ‘hello world’ log output.

  • Why do I get an error when I want to run cv2.imshow within docker container
  • Dockerized jenkins is a good choice?
  • How to load balance services in CoreOS?
  • Nginx Docker On ElasticBeanstalk: No Such File Or Directory
  • Disable ip v6 in docker container
  • Run test cases for a tool across a fleet of windows hosts
  • What do I need to do to receive output back to the OSX host?

  • How to run tests on CentOS 7 with Travis-CI?
  • Pulling docker image python:2.7-onbuild taking a long time
  • Iterate in RUN command in Dockerfile
  • Cannot start container lstat no such file or directory
  • docker postgres failed to start with specified port
  • Can't access container's web server on localhost:80
  • One Solution collect form web for “docker on OSX not returning container output through ssh,”

    The problem comes from the fact that your Docker client (on OS X) is more recent than your server (in the boot2docker VM).

    The Docker API uses semantic versioning, so each call is a HTTP request to an URL which looks like this:


    The server handles all versions of the API, so if you use an old client (old CLI version, or a program which was designed for an older version of Docker), it will still work properly, because the latest Docker knows how to handle e.g. /v1.3/blahblahblah.

    However, if you use a newer client with an older server, it might issue requests for /v1.12/… while the server only knows how to handle up to /v1.10/…. In that case, the server will give you a weird answer, like “Not Found”.

    This can obviously be confusing 🙂

    We look forward to the following improvements:

    • the server could recognize the /vXXX pattern, and if XXX is an unsupported version, it could issue an explanatory message;
    • the client could recognize that, and try to fallback to a previous version of the protocol.

    Contributions to the Docker project are always welcome; and while the second option might be a bit tricky to implement, the first one should be relatively easy; so this might be a good way to add your name to the Docker contributors list 😀

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.