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

SEE ALSO

155       podman(1), podman-run(1), podman-create(1)
156
157

HISTORY

159       December  2017,  Originally  compiled  by Urvashi Mohnani umohnani@red‐
160       hat.com ⟨mailto:umohnani@redhat.com⟩
161
162
163
164                                                              podman-commit(1)
Impressum