In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-25 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.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.