Container (original) (raw)

Container security FAQs

Docker Desktop runs all containers inside a customized Linux virtual machine (except for native Windows containers). This adds strong isolation between containers and the host machine, even when containers run as root.

Important considerations include:

With Enhanced Container Isolation turned on, each container runs in a dedicated Linux user namespace inside the Docker Desktop VM. Even privileged containers only have privileges within their container boundary, not the VM. ECI uses advanced techniques to prevent containers from breaching the Docker Desktop VM and Docker Engine.

Containers can only access host files that are:

  1. Shared using Docker Desktop settings
  2. Explicitly bind-mounted into the container (e.g., docker run -v /path/to/host/file:/mnt)

No. Host file sharing uses a user-space file server (running in com.docker.backend as the Docker Desktop user), so containers can only access files that the Docker Desktop user already has permission to access.