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
13       podman container commit [options] container [image]
14
15

DESCRIPTION

17       podman commit creates an image based on a changed container. The author
18       of the image can be set using the --author OPTION.  Various  image  in‐
19       structions can be configured with the --change OPTION and a commit mes‐
20       sage can be set using the --message OPTION. The container and its  pro‐
21       cesses  aren't  paused while the image is committed. If this is not de‐
22       sired, the --pause OPTION can be set to true. When the commit  is  com‐
23       plete, Podman prints out the ID of the new image.
24
25
26       If  image  does  not begin with a registry name component, localhost is
27       added to the name.  If image is not provided, the values for the REPOS‐
28       ITORY and TAG values of the created image is set to <none>.
29
30

OPTIONS

32   --author, -a=author
33       Set the author for the committed image.
34
35
36   --change, -c=instruction
37       Apply the following possible instructions to the created image:
38
39
40CMD
41
42ENTRYPOINT
43
44ENV
45
46EXPOSE
47
48LABEL
49
50ONBUILD
51
52STOPSIGNAL
53
54USER
55
56VOLUME
57
58WORKDIR
59
60
61
62       Can be set multiple times.
63
64
65   --format, -f=oci | docker
66       Set  the format of the image manifest and metadata.  The currently sup‐
67       ported formats are oci and docker.
68       The default is oci.
69
70
71   --iidfile=ImageIDfile
72       Write the image ID to the file.
73
74
75   --include-volumes
76       Include in the committed image any volumes added to  the  container  by
77       the  --volume  or  --mount  OPTIONS to the podman create and podman run
78       commands.
79       The default is false.
80
81
82   --message, -m=message
83       Set commit message for committed image.
84       IMPORTANT: The message field is not supported in oci format.
85
86
87   --pause, -p
88       Pause the container when creating an image.
89       The default is false.
90
91
92   --quiet, -q
93       Suppresses output.
94       The default is false.
95
96
97   --squash, -s
98       Squash newly built layers into a single new layer.
99       The default is false.
100
101

EXAMPLES

103       Create image from container with entrypoint and label
104
105
106              $ podman commit --change CMD=/bin/bash --change ENTRYPOINT=/bin/sh --change "LABEL blue=image" reverent_golick image-committed
107              Getting image source signatures
108              Copying blob sha256:b41deda5a2feb1f03a5c1bb38c598cbc12c9ccd675f438edc6acd815f7585b86
109               25.80 MB / 25.80 MB [======================================================] 0s
110              Copying config sha256:c16a6d30f3782288ec4e7521c754acc29d37155629cb39149756f486dae2d4cd
111               448 B / 448 B [============================================================] 0s
112              Writing manifest to image destination
113              Storing signatures
114              e3ce4d93051ceea088d1c242624d659be32cf1667ef62f1d16d6b60193e2c7a8
115
116
117
118       Create image from container with commit message
119
120
121              $ podman commit -q --message "committing container to image"
122              reverent_golick image-committed
123              e3ce4d93051ceea088d1c242624d659be32cf1667ef62f1d16d6b60193e2c7a8
124
125
126
127       Create image from container with author
128
129
130              $ podman commit -q --author "firstName lastName" reverent_golick image-committed
131              e3ce4d93051ceea088d1c242624d659be32cf1667ef62f1d16d6b60193e2c7a8
132
133
134
135       Pause a running container while creating the image
136
137
138              $ podman commit -q --pause=true containerID image-committed
139              e3ce4d93051ceea088d1c242624d659be32cf1667ef62f1d16d6b60193e2c7a8
140
141
142
143       Create an image from a container with a default image tag
144
145
146              $ podman commit containerID
147              e3ce4d93051ceea088d1c242624d659be32cf1667ef62f1d16d6b60193e2c7a8
148
149
150
151       Create an image from container with default required  capabilities  are
152       SETUID and SETGID
153
154
155              $ podman commit -q --change LABEL=io.containers.capabilities=setuid,setgid epic_nobel privimage
156              400d31a3f36dca751435e80a0e16da4859beb51ff84670ce6bdc5edb30b94066
157
158
159

SEE ALSO

161       podman(1), podman-run(1), podman-create(1)
162
163

HISTORY

165       December  2017,  Originally  compiled  by Urvashi Mohnani umohnani@red‐
166       hat.com ⟨mailto:umohnani@redhat.com⟩
167
168
169
170                                                              podman-commit(1)
Impressum