.nh .TH buildah\-pull "1" "July 2018" "buildah" .SH NAME .PP buildah\-pull \- Pull an image from a registry. .SH SYNOPSIS .PP \fBbuildah pull\fP [\fIoptions\fP] \fIimage\fP .SH DESCRIPTION .PP Pulls an image based upon the specified image name. Image names use a "transport":"details" format. .PP Multiple transports are supported: .PP \fBdir:\fP\fIpath\fP An existing local directory \fIpath\fP containing the manifest, layer tarballs, and signatures in individual files. This is a non\-standardized format, primarily useful for debugging or noninvasive image inspection. .PP \fBdocker://\fP\fIdocker\-reference\fP (Default) An image in a registry implementing the "Docker Registry HTTP API V2". By default, uses the authorization state in \fB\fC$XDG\\\_RUNTIME\\\_DIR/containers/auth.json\fR, which is set using \fB\fC(buildah login)\fR\&. If the authorization state is not found there, \fB\fC$HOME/.docker/config.json\fR is checked, which is set using \fB\fC(docker login)\fR\&. If \fIdocker\-reference\fP does not include a registry name, \fIlocalhost\fP will be consulted first, followed by any registries named in the registries configuration. .PP \fBdocker\-archive:\fP\fIpath\fP An image is retrieved as a \fB\fCdocker load\fR formatted file. .PP \fBdocker\-daemon:\fP\fIdocker\-reference\fP An image \fIdocker\-reference\fP stored in the docker daemon's internal storage. \fIdocker\-reference\fP must include either a tag or a digest. Alternatively, when reading images, the format can also be docker\-daemon:algo:digest (an image ID). .PP \fBoci:\fP\fIpath\fP\fB:\fP\fItag\fP** An image tag in a directory compliant with "Open Container Image Layout Specification" at \fIpath\fP\&. .PP \fBoci\-archive:\fP\fIpath\fP\fB:\fP\fItag\fP An image \fItag\fP in a directory compliant with "Open Container Image Layout Specification" at \fIpath\fP\&. .SS DEPENDENCIES .PP Buildah resolves the path to the registry to pull from by using the /etc/containers/registries.conf file, containers\-registries.conf(5). If the \fB\fCbuildah pull\fR command fails with an "image not known" error, first verify that the registries.conf file is installed and configured appropriately. .SH RETURN VALUE .PP The image ID of the image that was pulled. On error 1 is returned. .SH OPTIONS .PP \fB\-\-all\-tags\fP, \fB\-a\fP .PP All tagged images in the repository will be pulled. .PP \fB\-\-arch\fP="ARCH" .PP Set the ARCH of the image to be pulled to the provided value instead of using the architecture of the host. (Examples: aarch64, arm, i686, ppc64le, s390x, x86\_64) .PP \fB\-\-authfile\fP \fIpath\fP .PP Path of the authentication file. Default is ${XDG\_RUNTIME\_DIR}/containers/auth.json, which is set using \fB\fCbuildah login\fR\&. If the authorization state is not found there, $HOME/.docker/config.json is checked, which is set using \fB\fCdocker login\fR\&. .PP \fB\-\-cert\-dir\fP \fIpath\fP .PP Use certificates at \fIpath\fP (*\&.crt, *\&.cert, *\&.key) to connect to the registry. The default certificates directory is \fI/etc/containers/certs.d\fP\&. .PP \fB\-\-creds\fP \fIcreds\fP .PP The [username[:password]] to use to authenticate with the registry if required. If one or both values are not supplied, a command line prompt will appear and the value can be entered. The password is entered without echo. .PP \fB\-\-decryption\-key\fP \fIkey[:passphrase]\fP .PP The [key[:passphrase]] to be used for decryption of images. Key can point to keys and/or certificates. Decryption will be tried with all keys. If the key is protected by a passphrase, it is required to be passed in the argument and omitted otherwise. .PP \fB\-\-quiet\fP, \fB\-q\fP .PP If an image needs to be pulled from the registry, suppress progress output. .PP \fB\-\-os\fP="OS" .PP Set the OS of the image to be pulled instead of using the current operating system of the host. .PP \fB\-\-os\fP="OS" .PP Set the OS of the image to be pulled to the provided value instead of using the current operating system of the host. .PP \fB\-\-policy\fP=\fBalways\fP|\fBmissing\fP|\fBnever\fP .PP Pull image policy. The default is \fBmissing\fP\&. .RS .IP \(bu 2 \fBmissing\fP: attempt to pull the latest image from the registries listed in registries.conf if a local image does not exist. Raise an error if the image is not in any listed registry and is not present locally. .IP \(bu 2 \fBalways\fP: Pull the image from the first registry it is found in as listed in registries.conf. Raise an error if not found in the registries, even if the image is present locally. .IP \(bu 2 \fBnever\fP: do not pull the image from the registry, use only the local version. Raise an error if the image is not present locally. .RE .PP \fB\-\-remove\-signatures\fP .PP Don't copy signatures when pulling images. .PP \fB\-\-tls\-verify\fP \fIbool\-value\fP .PP Require HTTPS and verification of certificates when talking to container registries (defaults to true). TLS verification cannot be used when talking to an insecure registry. .PP \fB\-\-variant\fP="" .PP Set the architecture variant of the image to be pulled. .SH EXAMPLE .PP buildah pull imagename .PP buildah pull docker://myregistry.example.com/imagename .PP buildah pull docker\-daemon:imagename:imagetag .PP buildah pull docker\-archive:filename .PP buildah pull oci\-archive:filename .PP buildah pull dir:directoryname .PP buildah pull \-\-tls\-verify=false myregistry/myrepository/imagename:imagetag .PP buildah pull \-\-creds=myusername:mypassword \-\-cert\-dir \~/auth myregistry/myrepository/imagename:imagetag .PP buildah pull \-\-authfile=/tmp/auths/myauths.json myregistry/myrepository/imagename:imagetag .PP buildah pull \-\-arch=aarch64 myregistry/myrepository/imagename:imagetag .PP buildah pull \-\-arch=arm \-\-variant=v7 myregistry/myrepository/imagename:imagetag .SH ENVIRONMENT .PP \fBBUILD\_REGISTRY\_SOURCES\fP .PP BUILD\_REGISTRY\_SOURCES, if set, is treated as a JSON object which contains lists of registry names under the keys \fB\fCinsecureRegistries\fR, \fB\fCblockedRegistries\fR, and \fB\fCallowedRegistries\fR\&. .PP When pulling an image from a registry, if the name of the registry matches any of the items in the \fB\fCblockedRegistries\fR list, the image pull attempt is denied. If there are registries in the \fB\fCallowedRegistries\fR list, and the registry's name is not in the list, the pull attempt is denied. .PP \fBTMPDIR\fP The TMPDIR environment variable allows the user to specify where temporary files are stored while pulling and pushing images. Defaults to '/var/tmp'. .SH FILES .PP \fBregistries.conf\fP (\fB\fC/etc/containers/registries.conf\fR) .PP 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. .PP \fBpolicy.json\fP (\fB\fC/etc/containers/policy.json\fR) .PP Signature policy file. This defines the trust policy for container images. Controls which container registries can be used for image, and whether or not the tool should trust the images. .SH SEE ALSO .PP buildah(1), buildah\-from(1), buildah\-login(1), docker\-login(1), containers\-policy.json(5), containers\-registries.conf(5)