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.

  • gcloud docker push reliability
  • How to debug dockerized self-detaching program?
  • Docker build in Jenkins
  • Obtaining Docker public key.json file
  • Ansible docker module picks random port by default
  • docker - creating and starting container, differences between API and CLI
  • What do I need to do to receive output back to the OSX host?

  • Ansible Docker Container - Clone Private Repo
  • How to estimate the VM resources (CPU, RAM, HDD etc) with respect to Docker image size? My images are huge, 5-10 GB
  • How to update rails app on production with Docker and Fig with zero downtime?
  • Live migration of a jboss/wildfly container with CRIU failed
  • How can I set a static IP address in a Docker container?
  • Docker intermittently failing when building image
  • 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.