1podman-commit(1)()                                          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  are  paused  while  the  image is committed. This minimizes the
22       likelihood of data corruption when creating the new image. If  this  is
23       not desired, the --pause OPTION can be set to false. When the commit is
24       complete, Podman will print out the ID of the new image.
25
26
27       If image does not begin with a registry name component, localhost  will
28       be  added  to  the  name.  If image is not provided, the values for the
29       REPOSITORY and TAG values of the created image  will  each  be  set  to
30       <none>.
31
32

OPTIONS

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

EXAMPLES

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

SEE ALSO

163       podman(1), podman-run(1), podman-create(1)
164
165

HISTORY

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