1podman-push(1)() podman-push(1)()
2
3
4
6 podman-push - Push an image from local storage to elsewhere
7
8
10 podman push [options] image [destination]
11
12
13 podman image push [options] image [destination]
14
15
17 Pushes an image from local storage to a specified destination. Push is
18 mainly used to push images to registries, however podman push can be
19 used to save images to tarballs and directories using the following
20 transports: dir:, docker-archive:, docker-daemon:, oci-archive:, and
21 ostree:.
22
23
25 Image stored in local container/storage
26
27
29 The DESTINATION is a location to store container images
30 The Image "DESTINATION" uses a "transport":"details" format.
31 If a transport is not given, podman push will attempt to push
32 to a registry.
33
34
35 Multiple transports are supported:
36
37
38 dir:path
39 An existing local directory path storing the manifest, layer tarballs
40 and signatures as individual files. This is a non-standardized format,
41 primarily useful for debugging or noninvasive container inspection.
42
43
44 docker://docker-reference
45 An image in a registry implementing the "Docker Registry HTTP API
46 V2". By default, uses the authorization state in $XDG_RUNTIME_DIR/con‐
47 tainers/auth.json, which is set using (podman login). If the authoriza‐
48 tion state is not found there, $HOME/.docker/config.json is checked,
49 which is set using (docker login).
50
51
52 docker-archive:path[:docker-reference]
53 An image is stored in the docker save formatted file. docker-refer‐
54 ence is only used when creating such a file, and it must not contain a
55 digest.
56
57
58 docker-daemon:docker-reference
59 An image docker-reference stored in the docker daemon internal stor‐
60 age. docker-reference must contain either a tag or a digest. Alterna‐
61 tively, when reading images, the format can also be docker-dae‐
62 mon:algo:digest (an image ID).
63
64
65 oci-archive:path:tag
66 An image tag in a directory compliant with "Open Container Image Lay‐
67 out Specification" at path.
68
69
70 ostree:image[@/absolute/repo/path]
71 An image in local OSTree repository. /absolute/repo/path defaults to
72 /ostree/repo.
73
74
76 --authfile=path
77
78
79 Path of the authentication file. Default is ${XDG_RUNTIME_DIR}/contain‐
80 ers/auth.json, which is set using podman login. If the authorization
81 state is not found there, $HOME/.docker/config.json is checked, which
82 is set using docker login. (Not available for remote commands)
83
84
85 Note: You can also override the default path of the authentication file
86 by setting the REGISTRY_AUTH_FILE environment variable. export REG‐
87 ISTRY_AUTH_FILE=path
88
89
90 --creds=[username[:password]]
91
92
93 The [username[:password]] to use to authenticate with the registry if
94 required. If one or both values are not supplied, a command line
95 prompt will appear and the value can be entered. The password is
96 entered without echo.
97
98
99 --cert-dir=path
100
101
102 Use certificates at path (*.crt, *.cert, *.key) to connect to the reg‐
103 istry. Default certificates directory is /etc/containers/certs.d. (Not
104 available for remote commands)
105
106
107 --compress
108
109
110 Compress tarball image layers when pushing to a directory using the
111 'dir' transport. (default is same compression type, compressed or
112 uncompressed, as source) Note: This flag can only be set when using the
113 dir transport
114
115
116 --digestfile Digestfile
117
118
119 After copying the image, write the digest of the resulting image to the
120 file. (Not available for remote commands)
121
122
123 --format, -f=format
124
125
126 Manifest Type (oci, v2s1, or v2s2) to use when pushing an image to a
127 directory using the 'dir:' transport (default is manifest type of
128 source) Note: This flag can only be set when using the dir transport
129
130
131 --quiet, -q
132
133
134 When writing the output image, suppress progress output
135
136
137 --remove-signatures
138
139
140 Discard any pre-existing signatures in the image
141
142
143 --sign-by=key
144
145
146 Add a signature at the destination using the specified key
147
148
149 --tls-verify=true|false
150
151
152 Require HTTPS and verify certificates when contacting registries
153 (default: true). If explicitly set to true, then TLS verification will
154 be used. If set to false, then TLS verification will not be used. If
155 not specified, TLS verification will be used unless the target registry
156 is listed as an insecure registry in registries.conf. (Not available
157 for remote commands)
158
159
161 This example pushes the image specified by the imageID to a local
162 directory in docker format.
163
164
165 # podman push imageID dir:/path/to/image
166
167
168 This example pushes the image specified by the imageID to a local
169 directory in oci format.
170
171
172 # podman push imageID oci-archive:/path/to/layout:image:tag
173
174
175 This example pushes the image specified by the imageID to a container
176 registry named registry.example.com
177
178
179 # podman push imageID docker://registry.example.com/repository:tag
180
181
182 This example pushes the image specified by the imageID to a container
183 registry named registry.example.com and saves the digest in the speci‐
184 fied digestfile.
185
186
187 # podman push --digestfile=/tmp/mydigest imageID docker://reg‐
188 istry.example.com/repository:tag
189
190
191 This example pushes the image specified by the imageID and puts it into
192 the local docker container store
193
194
195 # podman push imageID docker-daemon:image:tag
196
197
198 This example pushes the alpine image to umohnani/alpine on dockerhub
199 and reads the creds from the path given to --authfile
200
201
202 # podman push --authfile temp-auths/myauths.json alpine docker://docker.io/umohnani/alpine
203 Getting image source signatures
204 Copying blob sha256:5bef08742407efd622d243692b79ba0055383bbce12900324f75e56f589aedb0
205 4.03 MB / 4.03 MB [========================================================] 1s
206 Copying config sha256:ad4686094d8f0186ec8249fc4917b71faa2c1030d7b5a025c29f26e19d95c156
207 1.41 KB / 1.41 KB [========================================================] 1s
208 Writing manifest to image destination
209 Storing signatures
210
211
212
213 This example pushes the rhel7 image to rhel7-dir with the "oci" mani‐
214 fest type
215
216
217 # podman push --format oci registry.access.redhat.com/rhel7 dir:rhel7-dir
218 Getting image source signatures
219 Copying blob sha256:9cadd93b16ff2a0c51ac967ea2abfadfac50cfa3af8b5bf983d89b8f8647f3e4
220 71.41 MB / 71.41 MB [======================================================] 9s
221 Copying blob sha256:4aa565ad8b7a87248163ce7dba1dd3894821aac97e846b932ff6b8ef9a8a508a
222 1.21 KB / 1.21 KB [========================================================] 0s
223 Copying config sha256:f1b09a81455c351eaa484b61aacd048ab613c08e4c5d1da80c4c46301b03cf3b
224 3.01 KB / 3.01 KB [========================================================] 0s
225 Writing manifest to image destination
226 Storing signatures
227
228
229
231 podman(1), podman-pull(1), podman-login(1)
232
233
234
235 podman-push(1)()