container_commit
Snapshot a container's current filesystem state as a new image, capturing debugging states or manual changes. Apply Dockerfile instructions to adjust the image.
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 image_build with a Dockerfile instead; publish the result with
image_tag + image_push. 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 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 full inspect payload (Id is the new image id)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tag | No | ||
| conf | No | ||
| pause | No | ||
| author | No | ||
| changes | No | ||
| message | No | ||
| id_or_name | Yes | ||
| repository | No |