docker top
Lists the processes running inside a container, as seen by the Docker daemon.
In more detail
Unlike running ps through docker exec, it works even if the image has no ps command, and it shows host-side process IDs. Extra ps options can be passed after the container name, for example docker top name -o pid,comm.
Example
docker top command-demoRelated terms
- docker exec — Runs an extra command inside a container that is already running.
- process ID — The number the kernel gives each running process so it can be told apart from all the others.
- process — A program that is currently running, with its own memory and a numeric identifier.
Taught in
- Commands, Logs, Exec And Exit Codes — Docker Architecture & Production Containers