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       Set the author for the committed image
36
37
38   --change, -c=instruction
39       Apply  the  following possible instructions to the created image: CMD |
40       ENTRYPOINT | ENV | EXPOSE | LABEL | ONBUILD | STOPSIGNAL | USER |  VOL‐
41       UME | WORKDIR
42
43
44       Can be set multiple times
45
46
47   --format, -f=format
48       Set  the format of the image manifest and metadata.  The currently sup‐
49       ported formats are oci  and  docker.   If  not  specifically  set,  the
50       default format used is oci.
51
52
53   --iidfile=ImageIDfile
54       Write the image ID to the file.
55
56
57   --include-volumes
58       Include  in  the  committed image any volumes added to the container by
59       the --volume or --mount options to the podman  create  and  podman  run
60       commands.
61
62
63   --message, -m=message
64       Set  commit message for committed image.  The message field is not sup‐
65       ported in oci format.
66
67
68   --pause, -p
69       Pause the container when creating an image
70
71
72   --quiet, -q
73       Suppress output
74
75

EXAMPLES

77   Create image from container with entrypoint and label
78              $ podman commit --change CMD=/bin/bash --change ENTRYPOINT=/bin/sh --change "LABEL blue=image" reverent_golick image-committed
79              Getting image source signatures
80              Copying blob sha256:b41deda5a2feb1f03a5c1bb38c598cbc12c9ccd675f438edc6acd815f7585b86
81               25.80 MB / 25.80 MB [======================================================] 0s
82              Copying config sha256:c16a6d30f3782288ec4e7521c754acc29d37155629cb39149756f486dae2d4cd
83               448 B / 448 B [============================================================] 0s
84              Writing manifest to image destination
85              Storing signatures
86              e3ce4d93051ceea088d1c242624d659be32cf1667ef62f1d16d6b60193e2c7a8
87
88
89
90   Create image from container with commit message
91              $ podman commit -q --message "committing container to image"
92              reverent_golick image-committed
93              e3ce4d93051ceea088d1c242624d659be32cf1667ef62f1d16d6b60193e2c7a8 ```
94
95
96
97   Create image from container with author
98              $ podman commit -q --author "firstName lastName" reverent_golick image-committed
99              e3ce4d93051ceea088d1c242624d659be32cf1667ef62f1d16d6b60193e2c7a8
100
101
102
103   Pause a running container while creating the image
104              $ podman commit -q --pause=true containerID image-committed
105              e3ce4d93051ceea088d1c242624d659be32cf1667ef62f1d16d6b60193e2c7a8
106
107
108
109   Create an image from a container with a default image tag
110              $ podman commit containerID
111              e3ce4d93051ceea088d1c242624d659be32cf1667ef62f1d16d6b60193e2c7a8
112
113
114
115   Create an image from  container  with  default  required  capabilities  are
116       SETUID and SETGID
117              $ podman commit -q --change LABEL=io.containers.capabilities=setuid,setgid epic_nobel privimage
118              400d31a3f36dca751435e80a0e16da4859beb51ff84670ce6bdc5edb30b94066
119
120
121

SEE ALSO

123       podman(1), podman-run(1), podman-create(1)
124
125

HISTORY

127       December  2017,  Originally  compiled  by Urvashi Mohnani umohnani@red‐
128       hat.com ⟨mailto:umohnani@redhat.com⟩
129
130
131
132                                                            podman-commit(1)()
Impressum