To fix the Docker permission denied error and use Docker as non-root user, create a group called "docker" with the following command:
$ sudo groupadd docker
Next, add your user to the docker group:
$ sudo usermod -aG docker $USER
After adding the user to the docker group, log out and log back in to take effect the changes.
Alternatively, run the following command to apply the changes to groups:
$ newgrp docker
From now on, the normal (non-root) user can be able to use Docker without sudo permissions.
Let me run the following commands as normal user:
$ docker version
$ docker run hello-world
start Docker:
sudo service docker start
原文链接:How To Run Docker As Non-root User In Linux - OSTechNix