Ad space (banner)
AD

Got the fundamentals? A structured Docker course is a fast way to level up.

Find Docker courses on Udemy

Affiliate link. Costs you nothing extra.

🐳Docker Lessons
Lesson 23 / 45

Viewing Processes with docker top

When you want to know what is actually running inside a container, use docker top. It lists the container's processes.

The syntax is docker top container. It works like the Linux ps command, scoped to one container.

Running docker top web shows the UID, PID, parent PID and command of each process inside the container.

A common stumble is expecting a container to run many processes. A container normally runs one main process, and when that process ends, the container stops.

In real work, it helps confirm whether the process you expected is really the one running.

Docker
Try it (type this into the pseudo terminal)
docker top web

🧑‍💻 You can type this command into the Docker pseudo terminal to try it yourself (this page itself has no interactive terminal).

Ad space (banner)
Ad space (in-article)