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 flag. Various image instruc‐
19       tions can be configured with the --change flag and a commit message can
20       be set using the --message flag. The container and  its  processes  are
21       paused  while  the image is committed. This minimizes the likelihood of
22       data corruption when creating the new image. If this  is  not  desired,
23       the --pause flag can be set to false. When the commit is complete, Pod‐
24       man 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
36
37       Set the author for the committed image
38
39
40       --change, -c=instruction
41
42
43       Apply  the  following possible instructions to the created image: CMD |
44       ENTRYPOINT | ENV | EXPOSE | LABEL | ONBUILD | STOPSIGNAL | USER |  VOL‐
45       UME | WORKDIR
46
47
48       Can be set multiple times
49
50
51       --format, -f=format
52
53
54       Set  the format of the image manifest and metadata.  The currently sup‐
55       ported formats are oci  and  docker.   If  not  specifically  set,  the
56       default format used is oci.
57
58
59       --iidfile=ImageIDfile
60
61
62       Write the image ID to the file.
63
64
65       --include-volumes
66
67
68       Include  in  the  committed image any volumes added to the container by
69       the --volume or --mount options to the podman  create  and  podman  run
70       commands.
71
72
73       --message, -m=message
74
75
76       Set  commit message for committed image.  The message field is not sup‐
77       ported in oci format.
78
79
80       --pause, -p
81
82
83       Pause the container when creating an image
84
85
86       --quiet, -q
87
88
89       Suppress output
90
91

EXAMPLES

93   Create image from container with entrypoint and label
94              $ podman commit --change CMD=/bin/bash --change ENTRYPOINT=/bin/sh --change "LABEL blue=image" reverent_golick image-committed
95              Getting image source signatures
96              Copying blob sha256:b41deda5a2feb1f03a5c1bb38c598cbc12c9ccd675f438edc6acd815f7585b86
97               25.80 MB / 25.80 MB [======================================================] 0s
98              Copying config sha256:c16a6d30f3782288ec4e7521c754acc29d37155629cb39149756f486dae2d4cd
99               448 B / 448 B [============================================================] 0s
100              Writing manifest to image destination
101              Storing signatures
102              e3ce4d93051ceea088d1c242624d659be32cf1667ef62f1d16d6b60193e2c7a8
103
104
105
106   Create image from container with commit message
107              $ podman commit -q --message "committing container to image"
108              reverent_golick image-committed
109              e3ce4d93051ceea088d1c242624d659be32cf1667ef62f1d16d6b60193e2c7a8 ```
110
111
112
113   Create image from container with author
114              $ podman commit -q --author "firstName lastName" reverent_golick image-committed
115              e3ce4d93051ceea088d1c242624d659be32cf1667ef62f1d16d6b60193e2c7a8
116
117
118
119   Pause a running container while creating the image
120              $ podman commit -q --pause=true containerID image-committed
121              e3ce4d93051ceea088d1c242624d659be32cf1667ef62f1d16d6b60193e2c7a8
122
123
124
125   Create an image from a container with a default image tag
126              $ podman commit containerID
127              e3ce4d93051ceea088d1c242624d659be32cf1667ef62f1d16d6b60193e2c7a8
128
129
130
131   Create an image from  container  with  default  required  capabilities  are
132       SETUID and SETGID
133              $ podman commit -q --change LABEL=io.containers.capabilities=setuid,setgid epic_nobel privimage
134              400d31a3f36dca751435e80a0e16da4859beb51ff84670ce6bdc5edb30b94066
135
136
137

SEE ALSO

139       podman(1), podman-run(1), podman-create(1)
140
141

HISTORY

143       December  2017,  Originally  compiled  by Urvashi Mohnani umohnani@red‐
144       hat.com ⟨mailto:umohnani@redhat.com⟩
145
146
147
148                                                            podman-commit(1)()
Impressum