github.com/containers/podman/v5@v5.1.0-rc1/docs/source/markdown/podman-push.1.md.in (about) 1 % podman-push 1 2 3 ## NAME 4 podman\-push - Push an image, manifest list or image index from local storage to elsewhere 5 6 ## SYNOPSIS 7 **podman push** [*options*] *image* [*destination*] 8 9 **podman image push** [*options*] *image* [*destination*] 10 11 ## DESCRIPTION 12 Pushes an image, manifest list or image index from local storage to a specified 13 destination. 14 15 ## Image storage 16 Images are pushed from those stored in local image storage. 17 18 ## DESTINATION 19 20 DESTINATION is the location the container image is pushed to. It supports all transports from `containers-transports(5)`. If no transport is specified, the `docker` (i.e., container registry) transport is used. For remote clients, including Mac and Windows (excluding WSL2) machines, `docker` is the only supported transport. 21 22 ``` 23 # Push to a container registry 24 $ podman push quay.io/podman/stable 25 26 # Push to a container registry via the docker transport 27 $ podman push docker://quay.io/podman/stable 28 29 # Push to a container registry with another tag 30 $ podman push myimage quay.io/username/myimage 31 32 # Push to a local directory 33 $ podman push myimage dir:/tmp/myimage 34 35 # Push to a tarball in the docker-archive format 36 $ podman push myimage docker-archive:/tmp/myimage 37 38 # Push to a local docker daemon 39 $ sudo podman push myimage docker-daemon:docker.io/library/myimage:33 40 41 # Push to a tarball in the OCI format 42 $ podman push myimage oci-archive:/tmp/myimage 43 ``` 44 45 ## OPTIONS 46 47 @@option authfile 48 49 @@option cert-dir 50 51 @@option dir-compress 52 53 Note: This flag can only be set when using the **dir** transport 54 55 @@option compression-format 56 57 @@option compression-level 58 59 @@option creds 60 61 @@option digestfile 62 63 @@option disable-content-trust 64 65 #### **--encrypt-layer**=*layer(s)* 66 67 Layer(s) to encrypt: 0-indexed layer indices with support for negative indexing (e.g. 0 is the first layer, -1 is the last layer). If not defined, encrypts all layers if encryption-key flag is specified. 68 69 #### **--encryption-key**=*key* 70 71 The [protocol:keyfile] specifies the encryption protocol, which can be JWE (RFC7516), PGP (RFC4880), and PKCS7 (RFC2315) and the key material required for image encryption. For instance, jwe:/path/to/key.pem or pgp:admin@example.com or pkcs7:/path/to/x509-file. 72 73 @@option force-compression 74 75 #### **--format**, **-f**=*format* 76 77 Manifest Type (oci, v2s2, or v2s1) to use when pushing an image. 78 79 #### **--quiet**, **-q** 80 81 When writing the output image, suppress progress output 82 83 #### **--remove-signatures** 84 85 Discard any pre-existing signatures in the image. 86 87 @@option retry 88 89 @@option retry-delay 90 91 #### **--sign-by**=*key* 92 93 Add a “simple signing” signature at the destination using the specified key. (This option is not available with the remote Podman client, including Mac and Windows (excluding WSL2) machines) 94 95 #### **--sign-by-sigstore**=*param-file* 96 97 Add a sigstore signature based on further options specified in a container's sigstore signing parameter file *param-file*. 98 See containers-sigstore-signing-params.yaml(5) for details about the file format. 99 100 #### **--sign-by-sigstore-private-key**=*path* 101 102 Add a sigstore signature at the destination using a private key at the specified path. (This option is not available with the remote Podman client, including Mac and Windows (excluding WSL2) machines) 103 104 @@option sign-passphrase-file 105 106 @@option tls-verify 107 108 ## EXAMPLE 109 110 Push the specified image to a local directory: 111 ``` 112 # podman push imageID dir:/path/to/image 113 ``` 114 115 Push the specified image to a local directory in OCI format: 116 ``` 117 # podman push imageID oci-archive:/path/to/layout:image:tag 118 ``` 119 120 Push the specified image to a container registry: 121 ``` 122 # podman push imageID docker://registry.example.com/repository:tag 123 ``` 124 125 Push the specified image to a container registry and save the digest in the specified file: 126 ``` 127 # podman push --digestfile=/tmp/mydigest imageID docker://registry.example.com/repository:tag 128 ``` 129 130 Push the specified image into the local Docker daemon container store: 131 ``` 132 # podman push imageID docker-daemon:image:tag 133 ``` 134 135 Push the specified image with a different image name using credentials from an alternate authfile path: 136 ``` 137 # podman push --authfile temp-auths/myauths.json alpine docker://docker.io/umohnani/alpine 138 Getting image source signatures 139 Copying blob sha256:5bef08742407efd622d243692b79ba0055383bbce12900324f75e56f589aedb0 140 4.03 MB / 4.03 MB [========================================================] 1s 141 Copying config sha256:ad4686094d8f0186ec8249fc4917b71faa2c1030d7b5a025c29f26e19d95c156 142 1.41 KB / 1.41 KB [========================================================] 1s 143 Writing manifest to image destination 144 Storing signatures 145 ``` 146 147 Push the specified image to a local directory as an OCI image: 148 ``` 149 # podman push --format oci registry.access.redhat.com/rhel7 dir:rhel7-dir 150 Getting image source signatures 151 Copying blob sha256:9cadd93b16ff2a0c51ac967ea2abfadfac50cfa3af8b5bf983d89b8f8647f3e4 152 71.41 MB / 71.41 MB [======================================================] 9s 153 Copying blob sha256:4aa565ad8b7a87248163ce7dba1dd3894821aac97e846b932ff6b8ef9a8a508a 154 1.21 KB / 1.21 KB [========================================================] 0s 155 Copying config sha256:f1b09a81455c351eaa484b61aacd048ab613c08e4c5d1da80c4c46301b03cf3b 156 3.01 KB / 3.01 KB [========================================================] 0s 157 Writing manifest to image destination 158 Storing signatures 159 ``` 160 161 ## SEE ALSO 162 **[podman(1)](podman.1.md)**, **[podman-pull(1)](podman-pull.1.md)**, **[podman-login(1)](podman-login.1.md)**, **[containers-certs.d(5)](https://github.com/containers/image/blob/main/docs/containers-certs.d.5.md)**, **[containers-registries.conf(5)](https://github.com/containers/image/blob/main/docs/containers-registries.conf.5.md)**, **[containers-transports(5)](https://github.com/containers/image/blob/main/docs/containers-transports.5.md)**