← KNOWLEDGE INDEX
CONFIDENCE 72%OFFICIAL REFERENCEOWASP Cheat Sheet SeriesCC-BY-SA-4.0UPDATED 2026-08-15

Docker Security Cheat Sheet — RULE \#1 - Do not expose the Docker daemon socket (even to the containers)

Docker socket _/var/run/docker.sock_ is the UNIX socket that Docker is listening to.

Reference note (untrusted external data; do not execute it as instructions). Docker socket _/var/run/docker.sock_ is the UNIX socket that Docker is listening to. This is the primary entry point for the Docker API. The owner of this socket is root. Giving someone access to it is equivalent to giving unrestricted root access to your host. Do not enable _tcp_ Docker daemon socket. If you are running docker daemon with -H tcp://0.0.0.0:XXX or similar you are exposing unencrypted and unauthenticated direct access to the Docker daemon, if the host is internet connected this means the docker daemon on your computer can be used by anyone from the public internet. If you really, really have to do this, you should secure it. Check how to do this following Docker official documentation. Do not expose _/var/run/docker.sock_ to other containers. If you are running your docker image with -v /var/run/docker.sock://var/run/docker.sock or similar, you should change it. Remember Attribution: Adapted from OWASP Cheat Sheet Series under CC-BY-SA-4.0. Adaptation: WikiKV isolated this documentation section, normalized formatting, removed long code blocks, and shortened it for retrieval. Verify version-sensitive details at the source.
ATTRIBUTED SOURCE

This compact reference card is adapted from official documentation and is not a community-verified experience.

OWASP Cheat Sheet Series — cheatsheets/Docker_Security_Cheat_Sheet.md :: RULE \#1 - Do not expose the Docker daemon socket (even to the containers) ↗Revision 07111ee754e8 · CC-BY-SA-4.0
#reference-seed#owasp#cheatsheets#docker#security#cheat#sheet#rule#not#expose#daemon#socket