Docker for Mac stopped running docker related commands

Expected behavior

  1. docker rmi would delete untagged images
  2. docker-compose build would run

Actual behavior

  1. Freezes
  2. Freezes

Information

Here is the detail of the diagnose (id: 2B5FD190-9E44-4317-BC93-2FE0A37AFB31):

Docker for Mac: version: mac-v1.12.0-beta16.2
OS X: version 10.11.5 (build: 15F34)
logs: /tmp/20160621-173737.tar.gz
failure: docker ps failed: Failure("docker ps: timeout after 10.00s")
[ERROR]  docker-cli
         docker ps failed
[OK]     app
[OK]     menubar
[OK]     virtualization
[OK]     system
[OK]     osxfs
[OK]     db
[OK]     slirp
[OK]     moby-console
[OK]     logs
[OK]     vmnetd
[OK]     env
[OK]     moby
[OK]     driver.amd64-linux

Steps to reproduce the behavior

  1. Install the most recent version of Docker for Mac.
  2. Try to run docker rmi or docker-compose

Same issues, I can’t even run docker ps anymore.

Glad to know I’m not the only one. I can’t run docker ps too.

So I followed this answer here and did this:

$ docker-machine start # start virtual machine for docker
$ docker-machine env  # it's helps to get environment variables
$ eval "$(docker-machine env default)" #set environment variables

and now when I run docker ps I get

Error response from daemon: client is newer than server (client API version: 1.24, server API version: 1.23)

Are you guys updating the infrastructure or something? Can you give us a status update?

If you run this command sequence, note that you’re running the VirtualBox Docker Toolbox VM setup, not the Docker for Mac beta any more. This probably comes with things like an older Docker daemon (the Docker for Mac beta package is now shipping with a beta release of Docker too). So, when docker says…

you just need to

export DOCKER_API_VERSION=1.23

I don’t know why the Docker client doesn’t automatically downgrade to an older protocol version; it’s clearly capable of speaking the older version and knows from the startup sequence what version the daemon wants.

1 Like

Now it’s all working! Thanks @dmaze, you saved my life.

I’m not sure if it was just your command, or the sequence of commands that fixed the issue. I guess that’s what I get for using the beta :stuck_out_tongue_winking_eye:

I did a shutdown and I got the same error. I repeat the steps and it went back to normal.
Do I have to repeat these commands every day from now on?? C’mon…