Docker ps is a command that lists containers, usually showing the ones that are running. It displays container IDs, images, commands, ports, names and status, and with options it can also show stopped containers or a different output format for scripting.
What Docker ps actually tells you
Docker ps is a snapshot of container state, not a deep inspection of what is happening inside the workload. By default it shows running containers, but the fields it exposes, such as image name, command, ports, and status, are often enough to reveal what is exposed to the network, what is currently active, and which services an operator expects to be present.
Why the output matters for security review
The command is operationally simple, but the information it reveals is security-relevant because it gives a quick inventory of live containers and their exposure surface. If a container is unexpectedly running, listening on a port, or using an image that should not be present, that is often the first sign of drift, misconfiguration, or unauthorized activity.
For defenders, the value is not the command itself, but the ability to compare what the platform reports against what should exist. That makes Docker ps a useful starting point for spotting exposed services, orphaned containers, and containers that survived longer than intended.
When the image and container metadata need a deeper security lens, NIST SP 800-190 Container Security is the clearest external reference for understanding image, registry, orchestrator, and runtime risk.
How operators use it in day-to-day administration
Practitioners use Docker ps as a fast operational check before troubleshooting, incident triage, or change verification. It helps answer basic questions such as whether a container started, whether it restarted unexpectedly, whether a port mapping is live, and whether the runtime view matches deployment intent.
That makes it especially useful in scripting and automation, where the formatted output can feed other checks. In practice, the command is often part of a larger workflow that verifies container presence, confirms service availability, and supports simple health or drift checks.
The broader control expectation around inventory, visibility, and configuration discipline is reflected in NIST SP 800-53 Rev 5 Security and Privacy Controls, especially where inventory, access control, auditability, and configuration management intersect.
What Docker ps does not show
Docker ps is intentionally shallow. It does not explain why a container is running, whether the image is trusted, whether the container has excessive privileges, or whether secrets were baked into the image or injected at runtime. A clean container list can therefore hide serious exposure if the underlying image, credentials, or deployment process are weak.
That is why the command should be treated as a visibility aid rather than a trust signal. If the container is real, the next questions are whether it belongs, whether it is secure, and whether its runtime configuration matches policy.
If you are reviewing container exposure against identity and secret-handling concerns, the OWASP Non-Human Identities Top 10 is a useful companion for understanding secret leakage, overprivilege, and long-lived credentials in containerized environments.
Risk and Threat Considerations
Docker ps becomes security-relevant when exposed containers, unexpected images, or unusual port mappings reveal a foothold, an unplanned service, or a workload that should not be reachable. Attackers often look for exactly that kind of runtime visibility gap because it can expose a path to credential theft, service abuse, or lateral movement.
Failure mechanism: A container can remain reachable or persist in an unexpected state even when operators believe it has been removed, isolated, or replaced, especially when deployment and runtime inventories are not reconciled.
Impact: The result can be unauthorized access to a service, exposure of secrets inside the container environment, or delayed detection of compromise because the running workload appears ordinary in a routine process list.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
OWASP Non-Human Identity Top 10 addresses the attack and risk surface, while NIST SP 800-190 and NIST SP 800-53 Rev 5 set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| NIST SP 800-190 | Application Container Security Guide | Container listings surface runtime, image, and registry risk in containerised environments |
| Recommendation — Review container runtime, image, and registry exposure when live containers appear unexpected or untrusted. | ||
| NIST SP 800-53 Rev 5 | CM-8 — System Component Inventory | Docker ps helps compare live containers against an authoritative inventory of components |
| AC-6 — Least Privilege | Unexpected container visibility can indicate excessive runtime access or privilege | |
| Recommendation — Maintain an accurate container inventory and reconcile live containers against approved assets. Apply least-privilege restrictions to container runtimes and associated access paths. | ||
| OWASP Non-Human Identity Top 10 | NHI-02 — Secret Leakage | Container listings often lead to review of exposed secrets and credentials in workloads |
| Recommendation — Inspect containers for embedded or exposed secrets when runtime output suggests sensitive workloads. | ||
Practitioner Guidance
Why practitioners should care: Use Docker ps as a first-pass control check, not as proof that the environment is healthy. Its real value is in confirming that the live container set matches the intended deployment set and that nothing unexpected is exposed.
What to watch for: Pay attention to containers that are running when they should not be, ports that are open without a clear business reason, and images whose names or tags do not align with the approved release path.
Practitioner takeaway: Treat the command as a visibility layer that should trigger deeper inspection of image provenance, runtime configuration, and secret exposure whenever the output looks unfamiliar.
Related resources from NHI Mgmt Group
- What does the hardcoded credential in a Docker image breach scenario teach us?
- How should security teams manage secrets in Docker images?
- What is the difference between Docker Secrets and BuildKit secret mounts?
- Should organisations scan Docker images for secrets if they already secure the source code?
Deepen Your Knowledge
Free weekly newsletter
Subscribe to the NHI & AI Identity Journal
The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.
Bonus 33% off our NHI Course when you subscribe.
Reviewed and updated by the NHIMG editorial team on November 3, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org