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 -v /volumes/data:/var/lib/postgresql/data postgres

But I receive the following error:

  • AWS Elastic Beanstalk Application and Static Assets Deployment Isolation
  • Docker Swarm managers acting nodes?
  • Gitlab 500 page after upgrading a gitlab setup with two-factor login
  • Deleting all Docker images from a repository
  • docker-compose does not start postgres image
  • How can I develop in docker container with intellij?
  • 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

  • Create a development environment for Laravel in Docker
  • Docker find all layers in an image
  • Use Docker registry with SSL certifictae without IP SANs
  • Docker, how to remote ssh from command line host to a docker container?
  • npm install errors out saying ' Error: getaddrinfo ENOTFOUND npm.lab.myorg.com'
  • docker-compose won't use my named volumes
  • One Solution collect form web for “Unable to execute docker command while docker is running”

    Use sudo docker run …. or read the following page to enable non-sudo run for your docker

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.