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:

  • Parsing error on salt docker-formula while using composeng
  • /home/web/.gem/ruby/2.2.0/gems/redis-3.2.1/lib/redis/connection/ruby.rb:152:in `getaddrinfo': getaddrinfo: Name or service not known (SocketError)
  • Why does docker run -t keep the bash process from exiting and stopping the container
  • Why does “/usr/bin/env bash -x” only work in command line?
  • npm install error inside docker container
  • How to get Docker work properly from within the msys2 bash?
  • 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

  • How to connect mysql workbench to running mysql inside docker?
  • Run a command on a container from inside another one
  • docker push - access not authorized
  • Cannot see the content of the volume from my Mac
  • Docker on CentOS report “unable to mount sys as readonly” when run
  • Can I use privileged Docker container to spawn other containers on host?
  • 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.