xxxxxxxxxx
# just open terminal and type this command
sudo chmod 666 /var/run/docker.sock
xxxxxxxxxx
# run this
sudo chmod 666 /var/run/docker.sock
xxxxxxxxxx
# Create the docker group if it does not exist
sudo groupadd docker
# Add your user to the docker group.
sudo usermod -aG docker $USER
# Log in to the new docker group (to avoid having to log out / log in again; but if not enough, try to reboot):
newgrp docker
# Check if docker can be run without root
docker run hello-world
# Reboot if still got error
reboot
xxxxxxxxxx
sudo chmod 666 /var/run/docker.sock
xxxxxxxxxx
sudo newgroup docker
sudo chmod 666 /var/run/docker.sock
sudo usermod -aG docker ${USER}
xxxxxxxxxx
sudo chmod 666 /var/run/docker.sock
xxxxxxxxxx
$ sudo usermod -aG docker $USER
xxxxxxxxxx
$ sudo usermod -aG docker $USER
$ newgrp docker
xxxxxxxxxx
*OS: Linux, Centos 7
---
sudo usermod -aG docker ${USER}
su -s ${USER}
---
then try again!