1podman-push(1)              General Commands Manual             podman-push(1)
2
3
4

NAME

6       podman-push - Push an image from local storage to elsewhere
7
8

SYNOPSIS

10       podman push [options] image [destination]
11
12

DESCRIPTION

14       Pushes an image from local storage to a specified destination.  Push is
15       mainly used to push images to registries, however podman push can be
16       used to save images to tarballs and directories using the following
17       transports: dir:, docker-archive:, docker-daemon:, oci-archive:, and
18       ostree:.
19
20

imageID

22       Image stored in local container/storage
23
24

DESTINATION

26       The DESTINATION is a location to store container images
27        The Image "DESTINATION" uses a "transport":"details" format.
28        If a transport is not given, podman push will attempt to push
29        to a registry.
30
31
32       Multiple transports are supported:
33
34
35       dir:path
36         An existing local directory path storing the manifest, layer tarballs
37       and signatures as individual files. This is a non-standardized format,
38       primarily useful for debugging or noninvasive container inspection.
39
40
41       docker://docker-reference
42         An image in a registry implementing the "Docker Registry HTTP API
43       V2". By default, uses the authorization state in
44       $XDG_RUNTIME_DIR/containers/auth.json, which is set using (podman
45       login). If the authorization state is not found there,
46       $HOME/.docker/config.json is checked, which is set using (docker
47       login).
48
49
50       docker-archive:path[:docker-reference]
51         An image is stored in the docker save formatted file.
52       docker-reference is only used when creating such a file, and it must
53       not contain a digest.
54
55
56       docker-daemon:docker-reference
57         An image docker-reference stored in the docker daemon internal
58       storage.  docker-reference must contain either a tag or a digest.
59       Alternatively, when reading images, the format can also be
60       docker-daemon:algo:digest (an image ID).
61
62
63       oci-archive:path:tag
64         An image tag in a directory compliant with "Open Container Image
65       Layout Specification" at path.
66
67
68       ostree:image[@/absolute/repo/path]
69         An image in local OSTree repository.  /absolute/repo/path defaults to
70       /ostree/repo.
71
72

OPTIONS

74       --authfile
75
76
77       Path of the authentication file. Default is
78       ${XDG_RUNTIME_DIR}/containers/auth.json, which is set using podman
79       login.  If the authorization state is not found there,
80       $HOME/.docker/config.json is checked, which is set using docker login.
81       (Not available for remote commands)
82
83
84       Note: You can also override the default path of the authentication file
85       by setting the REGISTRY_AUTH_FILE environment variable. export
86       REGISTRY_AUTH_FILE=path
87
88
89       --creds="CREDENTIALS"
90
91
92       The [username[:password]] to use to authenticate with the registry if
93       required.  If one or both values are not supplied, a command line
94       prompt will appear and the value can be entered.  The password is
95       entered without echo.
96
97
98       --cert-dir path
99
100
101       Use certificates at path (*.crt, *.cert, *.key) to connect to the
102       registry.  Default certificates directory is /etc/containers/certs.d.
103       (Not available for remote commands) (Not available for remote commands)
104
105
106       --compress
107
108
109       Compress tarball image layers when pushing to a directory using the
110       'dir' transport. (default is same compression type, compressed or
111       uncompressed, as source) Note: This flag can only be set when using the
112       dir transport
113
114
115       --format, -f
116
117
118       Manifest Type (oci, v2s1, or v2s2) to use when pushing an image to a
119       directory using the 'dir:' transport (default is manifest type of
120       source) Note: This flag can only be set when using the dir transport
121
122
123       --quiet, -q
124
125
126       When writing the output image, suppress progress output
127
128
129       --remove-signatures
130
131
132       Discard any pre-existing signatures in the image
133
134
135       --sign-by="KEY"
136
137
138       Add a signature at the destination using the specified key
139
140
141       --tls-verify
142
143
144       Require HTTPS and verify certificates when contacting registries
145       (default: true). If explicitly set to true, then TLS verification will
146       be used. If set to false, then TLS verification will not be used. If
147       not specified, TLS verification will be used unless the target registry
148       is listed as an insecure registry in registries.conf. (Not available
149       for remote commands)
150
151

EXAMPLE

153       This example extracts the imageID image to a local directory in docker
154       format.
155
156
157       # podman push imageID dir:/path/to/image
158
159
160       This example extracts the imageID image to a local directory in oci
161       format.
162
163
164       # podman push imageID oci-archive:/path/to/layout:image:tag
165
166
167       This example extracts the imageID image to a container registry named
168       registry.example.com
169
170
171       # podman push imageID docker://registry.example.com/repository:tag
172
173
174       This example extracts the imageID image and puts into the local docker
175       container store
176
177
178       # podman push imageID docker-daemon:image:tag
179
180
181       This example pushes the alpine image to umohnani/alpine on dockerhub
182       and reads the creds from the path given to --authfile
183
184
185              # podman push --authfile temp-auths/myauths.json alpine docker://docker.io/umohnani/alpine
186              Getting image source signatures
187              Copying blob sha256:5bef08742407efd622d243692b79ba0055383bbce12900324f75e56f589aedb0
188               4.03 MB / 4.03 MB [========================================================] 1s
189              Copying config sha256:ad4686094d8f0186ec8249fc4917b71faa2c1030d7b5a025c29f26e19d95c156
190               1.41 KB / 1.41 KB [========================================================] 1s
191              Writing manifest to image destination
192              Storing signatures
193
194
195
196       This example pushes the rhel7 image to rhel7-dir with the "oci"
197       manifest type
198
199
200              # podman push --format oci registry.access.redhat.com/rhel7 dir:rhel7-dir
201              Getting image source signatures
202              Copying blob sha256:9cadd93b16ff2a0c51ac967ea2abfadfac50cfa3af8b5bf983d89b8f8647f3e4
203               71.41 MB / 71.41 MB [======================================================] 9s
204              Copying blob sha256:4aa565ad8b7a87248163ce7dba1dd3894821aac97e846b932ff6b8ef9a8a508a
205               1.21 KB / 1.21 KB [========================================================] 0s
206              Copying config sha256:f1b09a81455c351eaa484b61aacd048ab613c08e4c5d1da80c4c46301b03cf3b
207               3.01 KB / 3.01 KB [========================================================] 0s
208              Writing manifest to image destination
209              Storing signatures
210
211
212

SEE ALSO

214       podman(1), podman-pull(1), podman-login(1)
215
216
217
218                                                                podman-push(1)
Impressum