Docker for mac daemon only accessible by root

Expected behavior

to be able to run docker as regular user

Actual behavior

need to run as root to avoid ‘Cannot Connect to Docker daemon’ etc error

Information

-bash: OS: command not found

  • a reproducible case if this is a bug, Dockerfiles FTW

  • host distribution and version ( OSX 10.10.x, OSX 10.11.x, Windows, etc )
    OSX 10.11.4 El Capitan macbook pro, mid 2015, 16gb

Steps to reproduce the behavior

  1. …download Docker.dmg
  2. …open dmg
    3… drag Docker.app to /Applications
    4… open terminal
    5… run docker ps
    6… see error

Work-around:

  1. sudo bash
  2. run docker ps
  3. no error

I had this same issue, noticed it was being caused by some old boot2docker stuff in my profile that was changing DOCKER_HOST.

-[[ -d $HOME/.boot2docker ]] && export DOCKER_HOST=tcp://192.168.59.103:2375

Removing that resolved my issue. Hope this helps.

I thought I had checked that but your message pompted me to check again.
That solved it.
Thanks!