container lifecycle
The stages a container passes through: created, running, paused, stopped (exited) and removed.
In more detail
Each Docker command moves it one step: create prepares it, start runs its process, stop asks it to exit, rm deletes it. Stopping keeps the container and its data for inspection; removing deletes it but never the image.
Related terms
- docker create — Prepares a container from an image, with its writable layer and settings, without starting it.
- docker start — Starts a container that already exists, keeping its writable layer and settings.
- docker stop — Asks a running container to shut down cleanly, then forces it if it does not.
- docker rm — Deletes a stopped container and its writable layer; the image stays.
- container status — The current state of a container as Docker reports it, such as created, running, exited or restarting.
Taught in
- Docker, OCI, The Engine And The CLI — Docker Architecture & Production Containers
- Install Docker And Verify Your Environment — Docker Architecture & Production Containers
- Run, Stop, Restart And Remove A Container — Docker Architecture & Production Containers