docker create

Prepares a container from an image, with its writable layer and settings, without starting it.

In more detail

It prints the new container ID and leaves the container in the created state. Separating create from start makes each lifecycle step observable; docker run does both at once.

Example

docker create --name lifecycle-demo alpine:3.20 sleep 30

Related terms

Taught in

References