commit_container
Snapshot a container's filesystem state into a new image, preserving manual changes or debugging state with optional Dockerfile instructions.
Instructions
Snapshot a container's current filesystem state as a new image.
Useful for capturing a debugging state or saving manual changes made inside a container.
For repeatable builds use a Dockerfile instead. The container is paused by default during
the snapshot to ensure filesystem consistency — set pause=False only if the container
cannot be paused. changes accepts Dockerfile instructions to apply on top of the
snapshot, e.g. ["CMD ["python", "app.py"]", "ENV FOO=bar"].
args: id_or_name - Container id or name to snapshot repository - Repository name for the new image, e.g. "myorg/myimage" tag - Tag for the new image (default: "latest") message - Commit message stored in the image metadata author - Author string stored in the image metadata pause - Pause the container during commit for consistency (default True) changes - Dockerfile instructions (CMD, ENV, EXPOSE, etc.) to apply to the image conf - Additional image configuration overrides as a dict returns: dict - The new image's attrs
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tag | No | ||
| conf | No | ||
| pause | No | ||
| author | No | ||
| changes | No | ||
| message | No | ||
| id_or_name | Yes | ||
| repository | No |