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