|
|
|
|
|
by raesene9
2475 days ago
|
|
A couple of things :- You can still mount filesystems as root from a container, if you have Docker command rights. In Docker's security model access to run docker commands on a given host == root, that's a design choice AFAIK, not an oversight. It's perfectly possible to mitigate that issue, by restricting who can run containers and also ensuring that all containers specify and use a non-root user account (or enable user namespaces at the Docker daemon level) Also, many early stage technologies don't prioritise security . For example, for several early releases of Kubernetes all you needed was remote access to a single port (10250/TCP) and you could get root access to the underlying host without any authentication... |
|
Otherwise you can hard code a UID when creating the user in the Dockerfile but that means your containers aren't generally portable.
In the end, the path of least resistance is to run as root within the container and simply accept the security implications if using volumes.