Docker socket
The file-like connection point, usually /var/run/docker.sock, through which programs send commands to the Docker daemon.
Access to the socket is full control of the host.
In more detail
Whoever can write to this Unix socket can start any container with any options, including one that mounts the whole host filesystem, so access to it is equivalent to root on the host. Never mount it into a container you do not fully trust, and never expose the daemon on a network port without TLS client certificates.
Related terms
- Unix socket — A special file that two programs on the same machine use to talk to each other.
- Docker daemon — The background program that owns images, containers, networks and volumes and does the work the docker command asks for.
- docker group — A Linux user group whose members may use Docker without sudo, which in practice gives them root on the host.
- root user — The all-powerful administrator account on Linux, with user ID 0, which can read or change anything.
Taught in
- Docker, OCI, The Engine And The CLI — Docker Architecture & Production Containers
- Install Docker And Verify Your Environment — Docker Architecture & Production Containers
- Minimal Bases, Non Root Users And Smaller Images — Docker Architecture & Production Containers
- Bind Mounts, Permissions And Backups — Docker Architecture & Production Containers
- Environment, Secret Files And Runtime Restrictions — Docker Architecture & Production Containers
- From Local Containers To Kubernetes — Docker Architecture & Production Containers