Skip to content

ContainerState

ContainerState = "created" | "running" | "draining" | "stopped" | "failed" | "removed"

Defined in: packages/runtime/src/container/types.ts:328

Container lifecycle state.

Transitions (see state-machine.ts):

  • created → running — via start()
  • running → stopped — explicit stop() / kill(), or PID-1 exit 0
  • running → failed — PID-1 exit non-zero, not explicitly stopped
  • running → draining → stopped — via drain()
  • stopped | failed → running — via start() (restart)
  • stopped | failed → removed — via remove()