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.

  • How-to run a node.js docker instance dropping into a shell that is auto-tailing logs
  • How to inspect a running Docker container
  • Docker deployments fail on Marathon, work fine otherwise
  • Can't get Docker image after windows installation
  • Docker: how do I make a DNS entry for a not yet started container available in another container
  • using kerberos in a container, inside of openshift / kubernetes
  • What do I need to do to receive output back to the OSX host?

  • Repeated “checking for a bsd-compatible install …” step running ./configure in docker container with debian jessie
  • Get python project into docker image
  • Ansible docker module picks random port by default
  • Docker can't start MariaDB/MySQL during Docker build
  • How to access host port from docker container
  • Getting “ECONNREFUSED” error after booting my computer. I'm using an express server and I'm trying to see that i can make requests
  • 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.