.nh .TH podman\-commit(1) .SH NAME .PP podman\-commit \- Create new image based on the changed container .SH SYNOPSIS .PP \fBpodman commit\fP [\fIoptions\fP] \fIcontainer\fP [\fIimage\fP] .PP \fBpodman container commit\fP [\fIoptions\fP] \fIcontainer\fP [\fIimage\fP] .SH DESCRIPTION .PP \fBpodman commit\fP creates an image based on a changed container. The author of the image can be set using the \fB\fC\-\-author\fR flag. Various image instructions can be configured with the \fB\fC\-\-change\fR flag and a commit message can be set using the \fB\fC\-\-message\fR flag. The container and its processes are paused while the image is committed. This minimizes the likelihood of data corruption when creating the new image. If this is not desired, the \fB\fC\-\-pause\fR flag can be set to false. When the commit is complete, Podman will print out the ID of the new image. .PP If \fIimage\fP does not begin with a registry name component, \fB\fClocalhost\fR will be added to the name. If \fIimage\fP is not provided, the values for the \fB\fCREPOSITORY\fR and \fB\fCTAG\fR values of the created image will each be set to \fB\fC\fR\&. .SH OPTIONS .SS \fB\-\-author\fP, \fB\-a\fP=\fIauthor\fP .PP Set the author for the committed image .SS \fB\-\-change\fP, \fB\-c\fP=\fIinstruction\fP .PP Apply the following possible instructions to the created image: \fBCMD\fP | \fBENTRYPOINT\fP | \fBENV\fP | \fBEXPOSE\fP | \fBLABEL\fP | \fBONBUILD\fP | \fBSTOPSIGNAL\fP | \fBUSER\fP | \fBVOLUME\fP | \fBWORKDIR\fP .PP Can be set multiple times .SS \fB\-\-format\fP, \fB\-f\fP=\fIformat\fP .PP Set the format of the image manifest and metadata. The currently supported formats are \fIoci\fP and \fIdocker\fP\&. If not specifically set, the default format used is \fIoci\fP\&. .SS \fB\-\-iidfile\fP=\fIImageIDfile\fP .PP Write the image ID to the file. .SS \fB\-\-include\-volumes\fP .PP Include in the committed image any volumes added to the container by the \fB\fC\-\-volume\fR or \fB\fC\-\-mount\fR options to the \fB\fCpodman create\fR and \fB\fCpodman run\fR commands. .SS \fB\-\-message\fP, \fB\-m\fP=\fImessage\fP .PP Set commit message for committed image. The message field is not supported in \fIoci\fP format. .SS \fB\-\-pause\fP, \fB\-p\fP .PP Pause the container when creating an image .SS \fB\-\-quiet\fP, \fB\-q\fP .PP Suppress output .SH EXAMPLES .SS Create image from container with entrypoint and label .PP .RS .nf $ podman commit \-\-change CMD=/bin/bash \-\-change ENTRYPOINT=/bin/sh \-\-change "LABEL blue=image" reverent\_golick image\-committed Getting image source signatures Copying blob sha256:b41deda5a2feb1f03a5c1bb38c598cbc12c9ccd675f438edc6acd815f7585b86 25.80 MB / 25.80 MB [======================================================] 0s Copying config sha256:c16a6d30f3782288ec4e7521c754acc29d37155629cb39149756f486dae2d4cd 448 B / 448 B [============================================================] 0s Writing manifest to image destination Storing signatures e3ce4d93051ceea088d1c242624d659be32cf1667ef62f1d16d6b60193e2c7a8 .fi .RE .SS Create image from container with commit message .PP .RS .nf $ podman commit \-q \-\-message "committing container to image" reverent\_golick image\-committed e3ce4d93051ceea088d1c242624d659be32cf1667ef62f1d16d6b60193e2c7a8 ``` .fi .RE .SS Create image from container with author .PP .RS .nf $ podman commit \-q \-\-author "firstName lastName" reverent\_golick image\-committed e3ce4d93051ceea088d1c242624d659be32cf1667ef62f1d16d6b60193e2c7a8 .fi .RE .SS Pause a running container while creating the image .PP .RS .nf $ podman commit \-q \-\-pause=true containerID image\-committed e3ce4d93051ceea088d1c242624d659be32cf1667ef62f1d16d6b60193e2c7a8 .fi .RE .SS Create an image from a container with a default image tag .PP .RS .nf $ podman commit containerID e3ce4d93051ceea088d1c242624d659be32cf1667ef62f1d16d6b60193e2c7a8 .fi .RE .SS Create an image from container with default required capabilities are SETUID and SETGID .PP .RS .nf $ podman commit \-q \-\-change LABEL=io.containers.capabilities=setuid,setgid epic\_nobel privimage 400d31a3f36dca751435e80a0e16da4859beb51ff84670ce6bdc5edb30b94066 .fi .RE .SH SEE ALSO .PP podman(1), podman\-run(1), podman\-create(1) .SH HISTORY .PP December 2017, Originally compiled by Urvashi Mohnani umohnani@redhat.com \[la]mailto:umohnani@redhat.com\[ra]