Docker daemon not loaded when SSH'ing in

Expected behavior

Docker should work as normal, even if no local user is logged into the machine.

Actual behavior

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

Information

Pinata:

OS X: version 10.11.4 (build: 15E65)
Docker.app: version v1.11.1-beta11
Running diagnostic tests:
[ERROR]   docker-cli       /var/run/docker.sock does not exist
[ERROR]   docker-cli       Unexpected error (No such file or directory) connecting to /var/run/docker.sock
[ERROR]   docker-cli       Connection refused (ECONNREFUSED) connecting to /var/tmp/docker.sock: check if service is running
Error docker ps: timeout after 10.00s
[ERROR]   docker-cli       docker ps failed: Misc.Failure
[OK]      docker-cli
[OK]      Moby booted
[ERROR]   driver.amd64-linux Docker.app/Contents/MacOS/com.docker.driver.amd64-linux -db is not running
[OK]      driver.amd64-linux
[OK]      vmnetd
[ERROR]   osxfs            com.docker.osxfs is not running
[OK]      osxfs
[ERROR]   db               Connection refused (ECONNREFUSED) connecting to /var/tmp/com.docker.db.socket: check if service is running
[ERROR]   db               com.docker.db is not running
[OK]      db
[ERROR]   slirp            Connection refused (ECONNREFUSED) connecting to /var/tmp/com.docker.port.socket: check if service is running
[ERROR]   slirp            com.docker.slirp is not running
[OK]      slirp
[OK]      menubar
[OK]      environment
[OK]      Docker
[OK]      VT-x
Error docker ps: got timeout (docker ps: exit 1)
Thread 6 killed on uncaught exception Misc.Failure
Error exec: echo "00000003.0000f3a6" | nc -U /var/tmp/com.docker.vsock/connect > /tmp/20160515-040713/diagnostics.tar: exit 1
Docker logs are being collected into /tmp/20160515-040713.tar.gz
Most specific failure is: com.docker.slirp is not running
Your unique id is: BD6B4B61-F6FB-435E-B3DB-6F94ED7C4128
Please quote this in all correspondence.

Steps to reproduce the behavior

  1. SSH my machine with the same username I always use
  2. Any docker command
1 Like

Same problem here. I’m trying to create docker host server.

Any movement on this? I realize this might be a wontfix due to the way macs are built around logging in before starting anything and Docker is specifically run as the user, but even a wontfix is better than silence :slight_smile:
This is an issue I can work around on my own (and already have) but I would like to know if it will be possible to use a mac as a headless docker server without logging in with the GUI, and all that entails.

1 Like

Same here. @tofagerl I’m kinda interested in what your “workaround” was…

+1

I would like to have Docker run without requiring a login. Presumably some launchd .plist should suffice, but I’m not familiar enough with the procedure to accomplish it on my own. @tofagerl, how did you accomplish it?

Oh, automatic login when starting the machine followed by a startup script which locks the desktop after X seconds.

Hi, could you share your workaround?
I have the same issue here and I don’t want to have a permanently logged user just to run Docker.app.

Right above you: Oh, automatic login when starting the machine followed by a startup script which locks the desktop after X seconds.

Thanks,
so you are logged in the whole time?

Sadly at my workplace they actively forbid (and enforce not to) automatic login :frowning:

1 Like