Re:Understanding Docker Container Escapes
by mclehman on Saturday July 20, 2019 @05:47PM
(#20488585)
On the other side of things, my favorite demo for people new to docker who aren't yet aware that sudoless docker ~~ root access is:
docker run -itv /:/host ubuntu chroot /hostOr, even better use nsenter to join all the namespaces of PID 1 on the host (making your process an ordinary root process in the init namespaces).
Because of this escape, giving access to /var/run/docker.sock to regular users is the same as giving them root access.
Also as the article says mounting /var/run/docker.sock is (now, because of this escape) the same as giving that container access to the host system.