github.com/containers/podman/v2@v2.2.2-0.20210501105131-c1e07d070c4c/docs/source/markdown/podman-push.1.md (about)

     1  % podman-push(1)
     2  
     3  ## NAME
     4  podman\-push - Push an image 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 from local storage to a specified destination.
    13  Push is mainly used to push images to registries, however **podman push**
    14  can be used to save images to tarballs and directories using the following
    15  transports: **dir:**, **docker-archive:**, **docker-daemon:** and **oci-archive:**.
    16  
    17  ## Image storage
    18  Images are pushed from those stored in local image storage.
    19  
    20  ## DESTINATION
    21  
    22   The DESTINATION is a location to store container images
    23   The Image "DESTINATION" uses a "transport":"details" format.
    24   If a transport is not given, podman push will attempt to push
    25   to a registry.
    26  
    27   Multiple transports are supported:
    28  
    29    **dir:**_path_
    30    An existing local directory _path_ storing the manifest, layer tarballs and signatures as individual files. This is a non-standardized format, primarily useful for debugging or noninvasive container inspection.
    31  
    32      $ podman push myimage dir:/tmp/myimage
    33  
    34    **docker://**_docker-reference_
    35    An image in a registry implementing the "Docker Registry HTTP API V2". By default, uses the authorization state in `$XDG_RUNTIME_DIR/containers/auth.json`, which is set using `(podman login)`. If the authorization state is not found there, `$HOME/.docker/config.json` is checked, which is set using `(docker login)`.
    36  
    37      $ podman push myimage quay.io/username/myimage
    38  
    39    **docker-archive:**_path_[**:**_docker-reference_]
    40    An image is stored in the `docker save` formatted file.  _docker-reference_ is only used when creating such a file, and it must not contain a digest.
    41  
    42      $ podman push myimage docker-archive:/tmp/myimage
    43  
    44    **docker-daemon:**_docker-reference_
    45    An image in _docker-reference_ format stored in the docker daemon internal storage. _docker-reference_ must contain a tag.
    46  
    47      $ sudo podman push myimage docker-daemon:docker.io/library/myimage:33
    48  
    49    **oci-archive:**_path_**:**_tag_
    50    An image _tag_ in a directory compliant with "Open Container Image Layout Specification" at _path_.
    51  
    52      $ podman push myimage oci-archive:/tmp/myimage
    53  
    54  ## OPTIONS
    55  
    56  #### **--authfile**=*path*
    57  
    58  Path of the authentication file. Default is ${XDG\_RUNTIME\_DIR}/containers/auth.json, which is set using `podman login`.
    59  If the authorization state is not found there, $HOME/.docker/config.json is checked, which is set using `docker login`.
    60  
    61  Note: You can also override the default path of the authentication file by setting the REGISTRY\_AUTH\_FILE
    62  environment variable. `export REGISTRY_AUTH_FILE=path`
    63  
    64  #### **--creds**=*[username[:password]]*
    65  
    66  The [username[:password]] to use to authenticate with the registry if required.
    67  If one or both values are not supplied, a command line prompt will appear and the
    68  value can be entered.  The password is entered without echo.
    69  
    70  #### **--cert-dir**=*path*
    71  
    72  Use certificates at *path* (\*.crt, \*.cert, \*.key) to connect to the registry.
    73  Default certificates directory is _/etc/containers/certs.d_. (Not available for remote commands)
    74  
    75  #### **--compress**
    76  
    77  Compress tarball image layers when pushing to a directory using the 'dir' transport. (default is same compression type, compressed or uncompressed, as source)
    78  Note: This flag can only be set when using the **dir** transport
    79  
    80  #### **--digestfile** *Digestfile*
    81  
    82  After copying the image, write the digest of the resulting image to the file.  (Not available for remote commands)
    83  
    84  #### **--disable-content-trust**
    85  
    86  This is a Docker specific option to disable image verification to a Docker
    87  registry and is not supported by Podman.  This flag is a NOOP and provided
    88  solely for scripting compatibility.
    89  
    90  #### **--format**, **-f**=*format*
    91  
    92  Manifest Type (oci, v2s1, or v2s2) to use when pushing an image to a directory using the 'dir:' transport (default is manifest type of source)
    93  Note: This flag can only be set when using the **dir** transport
    94  
    95  #### **--quiet**, **-q**
    96  
    97  When writing the output image, suppress progress output
    98  
    99  #### **--remove-signatures**
   100  
   101  Discard any pre-existing signatures in the image
   102  
   103  #### **--sign-by**=*key*
   104  
   105  Add a signature at the destination using the specified key
   106  
   107  #### **--tls-verify**=*true|false*
   108  
   109  Require HTTPS and verify certificates when contacting registries (default: true). If explicitly set to true,
   110  then TLS verification will be used. If set to false, then TLS verification will not be used. If not specified,
   111  TLS verification will be used unless the target registry is listed as an insecure registry in registries.conf.
   112  
   113  ## EXAMPLE
   114  
   115  This example pushes the image specified by the imageID to a local directory in docker format.
   116  
   117   `# podman push imageID dir:/path/to/image`
   118  
   119  This example pushes the image specified by the imageID to a local directory in oci format.
   120  
   121   `# podman push imageID oci-archive:/path/to/layout:image:tag`
   122  
   123  This example pushes the image specified by the imageID to a container registry named registry.example.com
   124  
   125   `# podman push imageID docker://registry.example.com/repository:tag`
   126  
   127  This example pushes the image specified by the imageID to a container registry named registry.example.com and saves the digest in the specified digestfile.
   128  
   129   `# podman push --digestfile=/tmp/mydigest imageID docker://registry.example.com/repository:tag`
   130  
   131  This example pushes the image specified by the imageID and puts it into the local docker container store
   132  
   133   `# podman push imageID docker-daemon:image:tag`
   134  
   135  This example pushes the alpine image to umohnani/alpine on dockerhub and reads the creds from
   136  the path given to --authfile
   137  
   138  ```
   139  # podman push --authfile temp-auths/myauths.json alpine docker://docker.io/umohnani/alpine
   140  Getting image source signatures
   141  Copying blob sha256:5bef08742407efd622d243692b79ba0055383bbce12900324f75e56f589aedb0
   142   4.03 MB / 4.03 MB [========================================================] 1s
   143  Copying config sha256:ad4686094d8f0186ec8249fc4917b71faa2c1030d7b5a025c29f26e19d95c156
   144   1.41 KB / 1.41 KB [========================================================] 1s
   145  Writing manifest to image destination
   146  Storing signatures
   147  ```
   148  
   149  This example pushes the rhel7 image to rhel7-dir with the "oci" manifest type
   150  ```
   151  # podman push --format oci registry.access.redhat.com/rhel7 dir:rhel7-dir
   152  Getting image source signatures
   153  Copying blob sha256:9cadd93b16ff2a0c51ac967ea2abfadfac50cfa3af8b5bf983d89b8f8647f3e4
   154   71.41 MB / 71.41 MB [======================================================] 9s
   155  Copying blob sha256:4aa565ad8b7a87248163ce7dba1dd3894821aac97e846b932ff6b8ef9a8a508a
   156   1.21 KB / 1.21 KB [========================================================] 0s
   157  Copying config sha256:f1b09a81455c351eaa484b61aacd048ab613c08e4c5d1da80c4c46301b03cf3b
   158   3.01 KB / 3.01 KB [========================================================] 0s
   159  Writing manifest to image destination
   160  Storing signatures
   161  ```
   162  
   163  ## SEE ALSO
   164  podman(1), podman-pull(1), podman-login(1)