Home>Article>Operation and Maintenance> Ordinary user runs docker
Specific method:
(Recommended tutorial:docker tutorial)
1. First create a docker user group. If docker The existence of the user group can be ignored
sudo groupadd docker
2. Add the user to the docker group
sudo gpasswd -a ${USER} docker
3. Restart docker
sudo service docker restart
4. If an ordinary user executes the docker command, if prompted get... dial unix /var/run/docker.sock permissions are not enough, then modify the permissions of /var/run/docker.sock
Use the root user to execute the following command, you can
sudo chmod a+rw /var/run/docker.sock
The above is the detailed content of Ordinary user runs docker. For more information, please follow other related articles on the PHP Chinese website!