In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Root permission is required to run docker.
To resolve the problem that non-root users do not have permission to run docker commands, the method is as follows:
Method 1:
Use sudo to get administrator privileges and run docker commands, which has many limitations when executing docker commands through scripts
Method 2:
When the docker daemon starts, the user group named docker is given permission to read and write Unix socket by default, so as long as the docker user group is created and the current user is added to the docker user group, the current user will have access to Unix socket and can execute docker-related commands
Sudo groupadd docker # add docker user group sudo gpasswd-a $USER docker # add login users to docker user group newgrp docker # update user group
Add:
How to get root permission in docker Container
First, your container needs to be running.
You can view the CONTAINER ID of the container through sudo docker container ls or sudo docker ps
Finally execute the command (where 7509371edd48 is the CONTAINER ID found above)
Sudo docker exec-ti-u root 7509371edd48 bash
This is the end of this article on the analysis of permissions needed to run docker. Do you need root permission for more related docker? please search for previous articles or continue to browse the relevant articles below. I hope you will support me in the future!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.