The aim of this cheat sheet is to provide an easy to use list of common security mistakes and good practices that will help you secure your Docker containers. Do not expose the Docker socket /var/run/docker.sock to other containers. If you are running docker with -H tcp://0.0:XXX or similar you are exposing 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.”]
Source: https://cheatsheetseries.owasp.org/cheatsheets/Docker_Security_Cheat_Sheet.html