Container States

LEVEL 0

The Problem

You run docker ps and see some containers. You run it again later and some are gone. Where did they go? Are they dead? Can you bring them back?

You try to start a container and get an error: “container already exists.” But you don’t see it in docker ps!

The confusion comes from not understanding that containers have states, and docker ps only shows some of them by default.