Home  >  Article  >  Operation and Maintenance  >  Ordinary user runs docker

Ordinary user runs docker

王林
王林forward
2020-08-29 16:38:314080browse

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!

Statement:
This article is reproduced at:csdn.net. If there is any infringement, please contact admin@php.cn delete