podman-commit
Create an image from a container's changes
TLDR
SYNOPSIS
podman commit [options] container [image]podman container commit [options] container [image]
DESCRIPTION
podman commit creates an image from the changed root filesystem of a container. The container is paused while the snapshot is taken, unless --pause is set to false. When the commit finishes, Podman prints the ID of the new image.podman container commit is the same command.The image records the container's current filesystem, plus any instructions passed with --change. It does not record a Containerfile, so the result cannot be rebuilt from a recipe the way podman build can.
PARAMETERS
CONTAINER
Name or ID of the container to commit.IMAGE
Name and optional tag for the new image. If omitted, the repository and tag are `<none>`. A name with no registry component is stored under localhost.-a, --author AUTHOR
Set the image author.-c, --change INSTRUCTION
Apply one image instruction: CMD, ENTRYPOINT, ENV, EXPOSE, LABEL, ONBUILD, STOPSIGNAL, USER, VOLUME, or WORKDIR. Repeat the flag for more than one instruction.--config FILE
Merge a JSON Schema2Config blob into the image configuration as the image is committed.-f, --format oci|docker
Manifest and metadata format. The default is oci.--iidfile FILE
Write the new image ID to a file.--include-volumes
Include volumes that were added to the container with --volume or --mount. Off by default.-m, --message MESSAGE
Set the commit message. The message field is not stored when the format is oci (the default).-p, --pause=true|false
Pause the container while the image is created. The default is true.-q, --quiet
Hide copy progress. The new image ID is still printed.-s, --squash
Squash the newly built layers into a single layer.
INSTALL
CAVEATS
The default format is oci, and OCI images do not store the commit message set with --message. Pass --format docker when that message must be kept.Volumes added with --volume or --mount are left out unless --include-volumes is set.Pausing is on by default so other processes cannot change the root filesystem mid-commit. --pause=false leaves the container running and can capture an inconsistent snapshot if writes are in flight.
HISTORY
The podman-commit manual page was first compiled in December 2017 by Urvashi Mohnani. The command is part of Podman, the daemonless container engine.
SEE ALSO
podman(1), podman-build(1), podman-run(1), docker-commit(1)
