Ordinary user runs docker

王林
Release: 2020-08-29 16:38:31
forward
3998 people have browsed it

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
Copy after login

2. Add the user to the docker group

sudo gpasswd -a ${USER} docker
Copy after login

3. Restart docker

sudo service docker restart
Copy after login

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
Copy after login

The above is the detailed content of Ordinary user runs docker. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:csdn.net
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!