What does mounting `/var/run/docker.sock` into a container mean?
IntermediateConceptVolumes & Bind Mounts
Answer
The container can talk to the host's Docker daemon, which equals root on the host (it can start privileged containers mounting /). It is used by CI agents, Traefik, Portainer. Safer alternatives: socket proxy with limited API verbs, rootless Docker, or daemonless builders (BuildKit, Kaniko, Buildah).
More on Volumes & Bind Mounts
What are the three ways to persist or share data with a container?BeginnerVolume vs bind mount: when do you pick which?BeginnerWhat is the difference between `-v` and `--mount`?BeginnerWhat is an anonymous volume and how do you find leftovers?IntermediateHow does a new named volume get populated?IntermediateHow do you back up and restore a named volume?Intermediate