Docker Community Forums

Share and learn in the Docker community.

Docker commands run only with sudo


(Aalikulov) #1

Hi. I’ve just installed Docker for Mac. There was no issues during installation. Docker is running. But when I try to execute any docker command in terminal I get message that command not found. It works only if I use sudo.
How I can make docker to run commands without sudo?
I do not have any DOCKER* environment variables set.

Here is diagnostics info:
Docker for Mac: version: mac-v1.12.0.1
OS X: version 10.11.6 (build: 15G31)
logs: /tmp/A9B76632-71F9-4FDD-B36E-2B27221FA8CC/20160827-020744.tar.gz
failure: cannot find docker
[ERROR] docker-cli
cannot find docker
docker-cli check failed with: Failure(“docker -v: timeout after 10.00s”)
[OK] app
[OK] moby-syslog
[OK] disk
[OK] virtualization
[OK] system
[OK] menubar
[OK] osxfs
[OK] db
[OK] slirp
[OK] moby-console
[OK] logs
[OK] vmnetd
[OK] env
[OK] moby
[OK] driver.amd64-linux


(Jenssaade) #2

+1 for using docker on mac without sudo (not everybody has admin rights)

Not sure how this is solved on a OSX environment. On linux there is a docker group you can add your user to in order to get rid of sudo’ing docker.