3 ms·
For normal web/console application development it isn't common to run containers with `--priviledged`. What are the use cases where doing this is required?
by politelemon 6y ago
For normal web/console application development it isn't common to run containers with `--priviledged`. What are the use cases where doing this is required?
- coayer 6y agoContainers with a wireguard connection need it. I imagine that’s not normal outside of home use though.
- nijave 6y agoAfaik --privileged just re-enables all the Linux capabitilies in one go (https://man7.org/linux/man-pages/man7/capabilities.7.html https://man7.org/linux/man-pages/man7/capabilities.7.html) So... None. If you need capabilities, you should add them back individually. Networking-related ones are pretty common (net admin and the raw socket one)
- samvher 6y agoI think if you run a container which in turn runs docker in a way that it can modify "sibling" containers on the host, it needs to be privileged. This can be practical for things like CI/CD, as you can use a docker container to build an updated image and then restart the service that uses that image. There might be a way to do the same without --privileged, I'm not sure.