1podman-commit(1)            General Commands Manual           podman-commit(1)
2
3
4

NAME

6       podman-commit - Create new image based on the changed container
7
8

SYNOPSIS

10       podman commit [options] container image
11
12

DESCRIPTION

14       podman commit creates an image based on a changed container. The author
15       of the image can be set using the --author flag. Various image
16       instructions can be configured with the --change flag and a commit
17       message can be set using the --message flag. The container and its
18       processes are paused while the image is committed. This minimizes the
19       likelihood of data corruption when creating the new image. If this is
20       not desired, the --pause flag can be set to false. When the commit is
21       complete, podman will print out the ID of the new image.
22
23
24       If image does not begin with a registry name component, localhost will
25       be added to the name.
26
27

OPTIONS

29       --author, -a
30
31
32       Set the author for the committed image
33
34
35       --change, -c
36
37
38       Apply the following possible instructions to the created image: CMD |
39       ENTRYPOINT | ENV | EXPOSE | LABEL | ONBUILD | STOPSIGNAL | USER |
40       VOLUME | WORKDIR
41
42
43       Can be set multiple times
44
45
46       --format, -f
47
48
49       Set the format of the image manifest and metadata.  The currently
50       supported formats are oci and docker.  If not specifically set, the
51       default format used is oci.
52
53
54       --iidfile ImageIDfile
55
56
57       Write the image ID to the file.
58
59
60       --include-volumes
61
62
63       Include in the committed image any volumes added to the container by
64       the --volume or --mount options to the podman create and podman run
65       commands.
66
67
68       --message, -m
69
70
71       Set commit message for committed image.  The message field is not
72       supported in oci format.
73
74
75       --pause, -p
76
77
78       Pause the container when creating an image
79
80
81       --quiet, -q
82
83
84       Suppress output
85
86

EXAMPLES

88              $ podman commit --change CMD=/bin/bash --change ENTRYPOINT=/bin/sh --change LABEL=blue=image reverent_golick image-commited
89              Getting image source signatures
90              Copying blob sha256:b41deda5a2feb1f03a5c1bb38c598cbc12c9ccd675f438edc6acd815f7585b86
91               25.80 MB / 25.80 MB [======================================================] 0s
92              Copying config sha256:c16a6d30f3782288ec4e7521c754acc29d37155629cb39149756f486dae2d4cd
93               448 B / 448 B [============================================================] 0s
94              Writing manifest to image destination
95              Storing signatures
96              e3ce4d93051ceea088d1c242624d659be32cf1667ef62f1d16d6b60193e2c7a8
97
98
99
100              $ podman commit -q --message "committing container to image" reverent_golick image-commited
101              e3ce4d93051ceea088d1c242624d659be32cf1667ef62f1d16d6b60193e2c7a8
102
103
104
105              $ podman commit -q --author "firstName lastName" reverent_golick image-commited
106              e3ce4d93051ceea088d1c242624d659be32cf1667ef62f1d16d6b60193e2c7a8
107
108
109
110              $ podman commit -q --pause=false containerID image-commited
111              e3ce4d93051ceea088d1c242624d659be32cf1667ef62f1d16d6b60193e2c7a8
112
113
114

SEE ALSO

116       podman(1), podman-run(1), podman-create(1)
117
118

HISTORY

120       December 2017, Originally compiled by Urvashi Mohnani
121       ⟨umohnani@redhat.com⟩
122
123
124
125                                                              podman-commit(1)
Impressum