Docker · Arazzo Workflow
Docker Snapshot a Running Container as an Image
Version 1.0.0
Pause a running container, commit its filesystem to a new image, unpause it, and tag the snapshot for a registry.
Provider
Workflows
commit-container-to-image
Pause a container, commit it to an image, resume it, and tag the result.
Confirms the container is running, pauses it so its filesystem is quiesced, commits it to a new repository and tag, unpauses the container, and applies a registry-qualified tag to the resulting snapshot image.
1
confirmRunning
ContainerInspect
Confirm the container is running and capture the image and config it was started from, so the snapshot can be traced back to its origin.
2
pauseContainer
ContainerPause
Pause the container so its filesystem is quiesced while the commit reads it. Committing a container under active write load risks capturing a torn state.
3
commitImage
ImageCommit
Commit the paused container's filesystem into a new image under the target repository and tag. The pause query parameter is set false here because the flow has already paused the container explicitly.
4
unpauseContainer
ContainerUnpause
Resume the container immediately after the commit. This step is mandatory — a flow that pauses a production container and does not resume it has taken an outage to take a snapshot.
5
verifyResumed
ContainerInspect
Confirm the container is running and no longer paused before the flow ends, so a failed resume surfaces here rather than in an incident channel.
6
tagSnapshot
ImageTag
Apply a registry-qualified tag to the snapshot image so it can be pushed somewhere durable rather than living only on the incident host.