Ivan Mushketyk
Ivan Mushketyk

Reputation: 8285

Unable to execute docker command while docker is running

I am trying to run the following docker commmand:

docker run --name my_postgres -d -p 127.0.0.1:5432:5432 -v /volumes/data:/var/lib/postgresql/data postgres

But I receive the following error:

2015/09/15 20:57:57 Cannot connect to the Docker daemon. Is 'docker -d' running on this host?

This is odd since I have docker up and running on my computer:

~  ps aux | grep docker
root     31083  0.1  0.0 355636 15420 ?        Ssl  20:58   0:00 /usr/bin/docker.io -d

Upvotes: 0

Views: 60

Answers (1)

Lexandro
Lexandro

Reputation: 785

Use sudo docker run .... or read the following page to enable non-sudo run for your docker https://askubuntu.com/questions/477551/how-can-i-use-docker-without-sudo

Upvotes: 1

Related Questions