Container Lifecycle
flowchart TB
S[Start] --> A & F
A{{docker create}} --> B([Created]) --> C{{docker start}}
C --> D([Running])
D --> E{{docker pause}}
F{{docker run}} --> D
E --> G([Paused])
G --> H{{docker unpause}}
H --> D -->|Container Program Exited|I{Has a restart policy?}
D --> J{{docker stop}} --> I
I -->|No| K([Exited]) --> C
I -->|Yes| L([Restarting]) --> D
K --> M{{docker rm}} --> N{"Partially removed <br> due to busy resource?"}
N -->|No| O([Removing]) --> P[End]
N -->|Yes| Q([Dead]) --> M