Explore our new Cybersecurity Terms Glossary, explained by our experts.

View the Glossary View the Glossary
PRIVIA

Cybersecurity Terms Glossary

What Is Docker Security?

Docker security covers the daemon, the host, the images, and the runtime flags that decide how much isolation a container actually has—starting with never exposing the API.

Illustration for the cybersecurity term Docker Security
Home / Blog / Cybersecurity Terms / What Is Docker Security?
17 November 2026

What Is Docker Security?

What Is Docker Security?

Docker security is the set of decisions that determine how much isolation a container actually has, and who can ask for a container to be created in the first place. The second question is the more urgent one, because the Docker daemon traditionally runs as root and anyone able to talk to it can run anything on the host with full privileges.

The Daemon Is the Crown Jewel

Membership of the docker group on a Linux host is equivalent to root. A user in that group can start a container with the host filesystem mounted and read or modify anything, with no password prompt and no sudo entry in the logs. Treat group membership as administrative access and manage it accordingly.

Far worse is exposing the daemon over the network. The API on TCP port 2375 is unauthenticated by default, and internet-wide scanning for it is continuous. Campaigns associated with TeamTNT and similar crews have built their entire operation around finding exposed Docker and Kubernetes endpoints, deploying cryptomining containers, and harvesting cloud credentials from the host. If you must expose the API, use TLS with client certificate authentication on port 2376, restrict it at the firewall, and ask first whether an SSH-based context would do instead.

Rootless Mode and User Namespaces

Rootless Docker runs the daemon and the containers as an unprivileged user, so a breakout lands as that user rather than as root. It has become production-viable, with limitations around certain networking features, privileged ports below 1024, and some storage drivers. Where rootless is impractical, user namespace remapping gives much of the benefit by mapping container root to an unprivileged host user.

Either way, the container should not run as root internally. Set USER in the image, and enforce it at runtime so that an image which ignores the convention cannot simply opt out.

The Flags That Undo Everything

Each of these appears in genuine tooling, which is precisely why they are the first thing an attacker looks for. The routes they open are covered in our entry on the container escape.

A Defensible Default

Run containers as a non-root user with --cap-drop=ALL and only the capabilities actually needed added back, a read-only root filesystem with writable tmpfs for scratch space, --security-opt no-new-privileges, the default seccomp and AppArmor or SELinux profiles enabled, and explicit memory and CPU limits so one container cannot starve the host. Put containers on user-defined bridge networks rather than the default bridge, which gives better isolation and name resolution.

On the image side, build from minimal bases, pin by digest, avoid baking secrets into layers, and scan before publishing—see container image scanning. Use BuildKit secret mounts for build-time credentials, and remember that Docker Content Trust or Cosign signatures are what stop a tampered image being pulled in place of yours.

Benchmarks and Verification

The CIS Docker Benchmark is the reference configuration baseline, and Docker Bench for Security automates most of its checks against a running host. Run it on every host that runs containers, not just the reference build, because configuration drifts. NIST SP 800-190 remains the clearest narrative guide to the risk categories across images, registries, orchestrators, and hosts.

Finally, keep the host current. The kernel, the Docker Engine, and containerd have each produced escape-grade vulnerabilities, including CVE-2019-5736 and the Leaky Vessels set in January 2024. Patching the host is container security, not a separate activity, and the same applies to the orchestrator if you have moved to Kubernetes—see Kubernetes admission controllers for how to enforce these defaults at scale.

At Privia Security, we test container hosts and platforms through our infrastructure security testing services.

FAQ – Frequently Asked Questions

Is Adding a User to the Docker Group the Same as Giving Them Root?

In practice, yes. Anyone who can reach the Docker socket can start a container that mounts the host filesystem and run commands as root inside it, with no further authentication. Treat docker group membership as administrative access to the host, grant it sparingly, review it regularly, and prefer rootless Docker or a sudo-wrapped command for users who only need to run specific workloads.

What Happens if Port 2375 Is Exposed to the Internet?

The Docker API on 2375 is unauthenticated, so anyone who finds it can create containers, mount the host filesystem, and take complete control of the machine. Automated scanning for this port is constant, and compromise typically follows within hours. Never expose it. If remote access is genuinely needed, use TLS with client certificates on 2376 behind a firewall, or an SSH-based Docker context.

Does Rootless Docker Remove the Need for Other Controls?

No, but it removes the worst outcome. A breakout from a rootless container lands as an unprivileged user rather than as host root, which substantially limits what follows. You still need capability dropping, seccomp, read-only filesystems, image scanning, and host patching. Rootless mode also has limitations around privileged ports, some networking modes, and certain storage drivers.

How Do I Check a Docker Host Is Configured Sensibly?

Run Docker Bench for Security, which automates most of the CIS Docker Benchmark checks against a live host, and review the findings on every host rather than only on the golden image. Supplement it by listing running containers with their flags, looking specifically for privileged mode, socket mounts, host namespaces, and unconfined seccomp. Those four cover most real-world weaknesses.

Related Terms

You May Be Interested In These

What Is Role-Based Access Control (RBAC)?

Cybersecurity Terms

17 November 2026

What Is Role-Based Access Control (RBAC)?

Read More
What Is Special Category Personal Data?

Cybersecurity Terms

17 November 2026

What Is Special Category Personal Data?

Read More
What Is DevSecOps?

Cybersecurity Terms

17 November 2026

What Is DevSecOps?

Read More