Docker ps failing on a fresh install

Expected behavior

It should show an empty list of docker containers. It actually takes up to 30/40 seconds when it should be instant.

Actual behavior

Error response from daemon: Bad response from Docker engine

Information

Javis-MacBook:~ javi$ docker ps
Error response from daemon: Bad response from Docker engine
Javis-MacBook:~ javi$ pinata diagnose -u
OS X: version 10.11.4 (build: 15E65)
Docker.app: version v1.11.1-beta12
Running diagnostic tests:
[OK] Moby booted
[OK] driver.amd64-linux
[OK] vmnetd
[OK] osxfs
[OK] db
[OK] slirp
[OK] menubar
[OK] environment
[OK] Docker
[OK] VT-x
Docker logs are being collected into /tmp/20160519-134112.tar.gz
Most specific failure is: No error was detected
Your unique id is: 70FBB2E6-31DC-4451-A43B-2D33CDC0A296
Please quote this in all correspondence.

Steps to reproduce the behavior

  1. Install installer app
  2. run docker ps on a terminal
1 Like

Mine returns the following:

Cannot connect to the Docker daemon. Is the docker daemon running on this host?

I’m guessing this has to do with environment exports not being setup in my Iterm2 session.

Hi,

I don’t believe you should not have any DOCKER* environment variables for
the session in which
you are using Docker for Mac.

I would have thought so too, but I can’t think of any other reason why this is not working. I have some containers running. This could be a different issue from the OP.

which docker
/usr/local/bin/docker
ls -la /usr/local/bin/docker resolved to /Applications/Docker.app/Contents/Resources/bin/docker

docker --version

Docker version 1.11.1, build 5604cbe

So ‘env|grep ^DO’ returns nothing? And you are not setting the same in any
shell startup
scripts?

2 Likes

Ohh… silly me! that was the problem. It looks like the old DOCKER stuff was still around. I unset all the ^DOCK vars and now it’s working. The OP might have a different issue.

Thanks for the help!

This also happened for me after upgrading to Version 1.11.1-beta12 (build: 7528), but worked after I went to Settings...->Uninstall/Reset->Reset to factory defaults.

2 Likes

This is happening to me as well. I don’t have any DOCKER environment variables set.

loberhub@macloberhub ~ $ docker ps
Error response from daemon: Bad response from Docker engine
 ! loberhub@macloberhub ~ $ pinata diagnose -u
OS X: version 10.10.5 (build: 14F1808)
Docker.app: version v1.11.1-beta12
Running diagnostic tests:
[OK]      Moby booted
[OK]      driver.amd64-linux
[OK]      vmnetd
[OK]      osxfs
[OK]      db
[OK]      slirp
[OK]      menubar
[OK]      environment
[OK]      Docker
[OK]      VT-x
Docker logs are being collected into /tmp/20160523-223719.tar.gz
Most specific failure is: No error was detected
Your unique id is: 8B26D415-C285-4144-AB6D-E2F9FB7721EB
Please quote this in all correspondence.

And this fix worked for me as well.

During the initial install everything worked. My computer crashed not long after, however, and when I rebooted, I had the same issue, requiring a reset. After I reset docker and this time, with a sudo, started docker–it’s working again (for now).

Kudos man, this fixed my issue too!