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

     1  % podman-pull(1)
     2  
     3  ## NAME
     4  podman\-pull - Pull an image from a registry
     5  
     6  ## SYNOPSIS
     7  **podman pull** [*options*] *source*
     8  
     9  **podman image pull** [*options*] *source*
    10  
    11  **podman pull** [*options*] [*transport*]*name*[:*tag*|@*digest*]
    12  
    13  **podman image pull** [*options*] [*transport*]*name*[:*tag*|@*digest*]
    14  
    15  ## DESCRIPTION
    16  Copies an image from a registry onto the local machine. **podman pull** pulls an
    17  image from Docker Hub if a registry is not specified in the command line argument.
    18  If an image tag is not specified, **podman pull** defaults to the image with the
    19  **latest** tag (if it exists) and pulls it. After the image is pulled, podman will
    20  print the full image ID.  **podman pull** can also pull an image
    21  using its digest **podman pull** *image*@*digest*. **podman pull** can be used to pull
    22  images from archives and local storage using different transports.
    23  
    24  ## Image storage
    25  Images are stored in local image storage.
    26  
    27  ## SOURCE
    28  
    29   The SOURCE is the location from which the container images are pulled.
    30   The Image "SOURCE" uses a "transport":"details" format.  Only the `docker` (container registry)
    31   transport is allowed for remote access.
    32  
    33   Multiple transports are supported:
    34  
    35    **dir:**_path_
    36    An existing local directory _path_ storing the manifest, layer tarballs and signatures as individual files. This
    37    is a non-standardized format, primarily useful for debugging or noninvasive container inspection.
    38  
    39      $ podman pull dir:/tmp/myimage
    40  
    41    **docker://**_docker-reference_ (Default)
    42    An image reference stored in a remote container image registry. The reference can include a path to a
    43    specific registry; if it does not, the registries listed in registries.conf will be queried to find a matching
    44    image. By default, credentials from podman login (stored at $XDG_RUNTIME_DIR/containers/auth.json by default)
    45    will  be used to authenticate; if these cannot be found, we will fall back to using credentials in
    46    $HOME/.docker/config.json.
    47  
    48      $ podman pull quay.io/username/myimage
    49  
    50    **docker-archive:**_path_[**:**_docker-reference_]
    51    An image is stored in the `docker save` formatted file.  _docker-reference_ is only used when creating such a
    52    file, and it must not contain a digest.
    53  
    54      $ podman pull docker-archive:/tmp/myimage
    55  
    56    **docker-daemon:**_docker-reference_
    57    An image in _docker-reference_ format stored in the docker daemon internal storage. The _docker-reference_ can also be an image ID (docker-daemon:algo:digest).
    58  
    59      $ sudo podman pull docker-daemon:docker.io/library/myimage:33
    60  
    61    **oci-archive:**_path_**:**_tag_
    62    An image _tag_ in a directory compliant with "Open Container Image Layout Specification" at _path_.
    63  
    64      $ podman pull oci-archive:/tmp/myimage
    65  
    66  ## OPTIONS
    67  
    68  #### **--all-tags**, **a**
    69  
    70  All tagged images in the repository will be pulled.
    71  
    72  Note: When using the all-tags flag, Podman will not iterate over the search registries in the containers-registries.conf(5) but will always use docker.io for unqualified image names.
    73  
    74  #### **--authfile**=*path*
    75  
    76  Path of the authentication file. Default is ${XDG\_RUNTIME\_DIR}/containers/auth.json, which is set using `podman login`.
    77  If the authorization state is not found there, $HOME/.docker/config.json is checked, which is set using `docker login`.
    78  
    79  Note: You can also override the default path of the authentication file by setting the REGISTRY\_AUTH\_FILE
    80  environment variable. `export REGISTRY_AUTH_FILE=path`
    81  
    82  #### **--cert-dir**=*path*
    83  
    84  Use certificates at *path* (\*.crt, \*.cert, \*.key) to connect to the registry.
    85  Default certificates directory is _/etc/containers/certs.d_. (Not available for remote commands)
    86  
    87  #### **--creds**=*[username[:password]]*
    88  
    89  The [username[:password]] to use to authenticate with the registry if required.
    90  If one or both values are not supplied, a command line prompt will appear and the
    91  value can be entered.  The password is entered without echo.
    92  
    93  #### **--disable-content-trust**
    94  
    95  This is a Docker specific option to disable image verification to a Docker
    96  registry and is not supported by Podman.  This flag is a NOOP and provided
    97  solely for scripting compatibility.
    98  
    99  #### **--override-arch**=*ARCH*
   100  Override the architecture, defaults to hosts, of the image to be pulled. For example, `arm`.
   101  
   102  #### **--override-os**=*OS*
   103  Override the OS, defaults to hosts, of the image to be pulled. For example, `windows`.
   104  
   105  #### **--override-variant**=*VARIANT*
   106  
   107  Use _VARIANT_ instead of the default architecture variant of the container image.  Some images can use multiple variants of the arm architectures, such as arm/v5 and arm/v7.
   108  
   109  #### **--quiet**, **-q**
   110  
   111  Suppress output information when pulling images
   112  
   113  #### **--tls-verify**=*true|false*
   114  
   115  Require HTTPS and verify certificates when contacting registries (default: true). If explicitly set to true,
   116  then TLS verification will be used. If set to false, then TLS verification will not be used. If not specified,
   117  TLS verification will be used unless the target registry is listed as an insecure registry in registries.conf.
   118  
   119  #### **--help**, **-h**
   120  
   121  Print usage statement
   122  
   123  ## EXAMPLES
   124  
   125  ```
   126  $ podman pull alpine:latest
   127  Trying to pull registry.access.redhat.com/alpine:latest... Failed
   128  Trying to pull registry.fedoraproject.org/alpine:latest... Failed
   129  Trying to pull docker.io/library/alpine:latest...Getting image source signatures
   130  Copying blob sha256:88286f41530e93dffd4b964e1db22ce4939fffa4a4c665dab8591fbab03d4926
   131   1.90 MB / 1.90 MB [========================================================] 0s
   132  Copying config sha256:76da55c8019d7a47c347c0dceb7a6591144d232a7dd616242a367b8bed18ecbc
   133   1.48 KB / 1.48 KB [========================================================] 0s
   134  Writing manifest to image destination
   135  Storing signatures
   136  04660052281190168dbb2362eb15bf7067a8dc642d2498055e0e72efa961a4b6
   137  ```
   138  
   139  ```
   140  $ podman pull alpine@sha256:d7342993700f8cd7aba8496c2d0e57be0666e80b4c441925fc6f9361fa81d10e
   141  Trying to pull docker.io/library/alpine@sha256:d7342993700f8cd7aba8496c2d0e57be0666e80b4c441925fc6f9361fa81d10e...
   142  Getting image source signatures
   143  Copying blob 188c0c94c7c5 done
   144  Copying config d6e46aa247 done
   145  Writing manifest to image destination
   146  Storing signatures
   147  d6e46aa2470df1d32034c6707c8041158b652f38d2a9ae3d7ad7e7532d22ebe0
   148  ```
   149  
   150  ```
   151  $ podman pull --authfile temp-auths/myauths.json docker://docker.io/umohnani/finaltest
   152  Trying to pull docker.io/umohnani/finaltest:latest...Getting image source signatures
   153  Copying blob sha256:6d987f6f42797d81a318c40d442369ba3dc124883a0964d40b0c8f4f7561d913
   154   1.90 MB / 1.90 MB [========================================================] 0s
   155  Copying config sha256:ad4686094d8f0186ec8249fc4917b71faa2c1030d7b5a025c29f26e19d95c156
   156   1.41 KB / 1.41 KB [========================================================] 0s
   157  Writing manifest to image destination
   158  Storing signatures
   159  03290064078cb797f3e0a530e78c20c13dd22a3dd3adf84a5da2127b48df0438
   160  ```
   161  
   162  ```
   163  $ podman pull --creds testuser:testpassword docker.io/umohnani/finaltest
   164  Trying to pull docker.io/umohnani/finaltest:latest...Getting image source signatures
   165  Copying blob sha256:6d987f6f42797d81a318c40d442369ba3dc124883a0964d40b0c8f4f7561d913
   166   1.90 MB / 1.90 MB [========================================================] 0s
   167  Copying config sha256:ad4686094d8f0186ec8249fc4917b71faa2c1030d7b5a025c29f26e19d95c156
   168   1.41 KB / 1.41 KB [========================================================] 0s
   169  Writing manifest to image destination
   170  Storing signatures
   171  03290064078cb797f3e0a530e78c20c13dd22a3dd3adf84a5da2127b48df0438
   172  ```
   173  
   174  ```
   175  $ podman pull --tls-verify=false --cert-dir image/certs docker.io/umohnani/finaltest
   176  Trying to pull docker.io/umohnani/finaltest:latest...Getting image source signatures
   177  Copying blob sha256:6d987f6f42797d81a318c40d442369ba3dc124883a0964d40b0c8f4f7561d913
   178   1.90 MB / 1.90 MB [========================================================] 0s
   179  Copying config sha256:ad4686094d8f0186ec8249fc4917b71faa2c1030d7b5a025c29f26e19d95c156
   180   1.41 KB / 1.41 KB [========================================================] 0s
   181  Writing manifest to image destination
   182  Storing signatures
   183  03290064078cb797f3e0a530e78c20c13dd22a3dd3adf84a5da2127b48df0438
   184  ```
   185  
   186  ```
   187  $ podman pull --override-arch=arm arm32v7/debian:stretch
   188  Trying to pull docker.io/arm32v7/debian:stretch...
   189  Getting image source signatures
   190  Copying blob b531ae4a3925 done
   191  Copying config 3cba58dad5 done
   192  Writing manifest to image destination
   193  Storing signatures
   194  3cba58dad5d9b35e755b48b634acb3fdd185ab1c996ac11510cc72c17780e13c
   195  ```
   196  
   197  ## FILES
   198  
   199  **registries.conf** (`/etc/containers/registries.conf`)
   200  
   201  	registries.conf is the configuration file which specifies which container registries should be consulted when completing image names which do not include a registry or domain portion.
   202  
   203  NOTE: Use the environment variable `TMPDIR` to change the temporary storage location of downloaded container images. Podman defaults to use `/var/tmp`.
   204  
   205  ## SEE ALSO
   206  podman(1), podman-push(1), podman-login(1), containers-registries.conf(5)
   207  
   208  ## HISTORY
   209  July 2017, Originally compiled by Urvashi Mohnani <umohnani@redhat.com>