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

EXAMPLES

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

SEE ALSO

158       podman(1), podman-run(1), podman-create(1)
159
160

HISTORY

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