Is the root user in a Docker image/container the same as the root user of the machine? I am curious about the security implications of using the root user in the Docker image.
TMK, the container is run by a non-root user (often the user is called "docker") and that user launched the docker-dameon. And the docker daemon launches the container process.
USER rootin a Dockerfile, if you could jump out of the container on their platforms then they wouldn't be happy but sounds secure enough, and they prevent you from jumpin out by not sharing root volumes maybe idk. – Alexander Mills Dec 16 '20 at 22:49docker runcommand.From https://docs.docker.com/engine/security/#docker-daemon-attack-surface, "only trusted users should be allowed to control your Docker daemon". Anyone who can run docker has root access to the host device.
– Eldritch Cheese Aug 29 '21 at 01:30