.nh .TH buildah\-push "1" "June 2017" "buildah" .SH NAME .PP buildah\-push \- Push an image, manifest list or image index from local storage to elsewhere. .SH SYNOPSIS .PP \fBbuildah push\fP [\fIoptions\fP] \fIimage\fP [\fIdestination\fP] .SH DESCRIPTION .PP Pushes an image from local storage to a specified destination, decompressing and recompessing layers as needed. .SH imageID .PP Image stored in local container/storage .SH DESTINATION .PP The DESTINATION is a location to store container images. If omitted, the source image parameter will be reused as destination. .PP The Image "DESTINATION" uses a "transport":"details" format. Multiple transports are supported: .PP \fBdir:\fP\fIpath\fP An existing local directory \fIpath\fP storing the manifest, layer tarballs and signatures as individual files. This is a non\-standardized format, primarily useful for debugging or noninvasive container inspection. .PP \fBdocker://\fP\fIdocker\-reference\fP 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, the image will be pushed to a registry running on \fIlocalhost\fP\&. .PP \fBdocker\-archive:\fP\fIpath\fP[\fB:\fP\fIdocker\-reference\fP] An image is stored in the \fB\fCdocker save\fR formatted file. \fIdocker\-reference\fP is only used when creating such a file, and it must not contain a digest. .PP \fBdocker\-daemon:\fP\fIdocker\-reference\fP An image \_docker\fIreference\fP stored in the docker daemon internal storage. If \_docker\fIreference\fP does not begin with a valid registry name (a domain name containing "." or the reserved name "localhost") then the default registry name "docker.io" will be prepended. \_docker\fIreference\fP must contain 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 \fItag\fP 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 tar archive compliant with "Open Container Image Layout Specification" at \fIpath\fP\&. .PP If the transport part of DESTINATION is omitted, "docker://" is assumed. .SH OPTIONS .PP \fB\-\-all\fP .PP If specified image is a manifest list or image index, push the images in addition to the list or index itself. .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\-\-digestfile\fP \fIDigestfile\fP .PP After copying the image, write the digest of the resulting image to the file. .PP \fB\-\-disable\-compression\fP, \fB\-D\fP .PP Don't compress copies of filesystem layers which will be pushed. .PP \fB\-\-encryption\-key\fP \fIkey\fP .PP 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. .PP \fB\-\-encrypt\-layer\fP \fIlayer(s)\fP .PP 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, will encrypt all layers if encryption\-key flag is specified. .PP \fB\-\-format\fP, \fB\-f\fP .PP Manifest Type (oci, v2s2, or v2s1) to use when pushing an image. (Supported for \fBdir\fP and \fBdocker\fP transports) .PP \fB\-\-quiet\fP, \fB\-q\fP .PP When writing the output image, suppress progress output. .PP \fB\-\-remove\-signatures\fP .PP Don't copy signatures when pushing images. .PP \fB\-\-rm\fP .PP When pushing a the manifest list or image index, delete them from local storage if pushing succeeds. .PP \fB\-\-sign\-by\fP \fIfingerprint\fP .PP Sign the pushed image using the GPG key that matches the specified fingerprint. .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. .SH EXAMPLE .PP This example pushes the image specified by the imageID to a local directory in docker format. .PP \fB\fC# buildah push imageID dir:/path/to/image\fR .PP This example pushes the image specified by the imageID to a local directory in oci format. .PP \fB\fC# buildah push imageID oci:/path/to/layout:image:tag\fR .PP This example pushes the image specified by the imageID to a tar archive in oci format. .PP \fB\fC# buildah push imageID oci\-archive:/path/to/archive:image:tag\fR .PP This example pushes the image specified by the imageID to a container registry named registry.example.com. .PP \fB\fC# buildah push imageID docker://registry.example.com/repository:tag\fR .PP 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. .PP \fB\fC# buildah push \-\-digestfile=/tmp/mydigest imageID docker://registry.example.com/repository:tag\fR .PP This example works like \fBdocker push\fP, assuming \fIregistry.example.com/my\_image\fP is a local image. .PP \fB\fC# buildah push registry.example.com/my\_image\fR .PP This example pushes the image specified by the imageID to a private container registry named registry.example.com with authentication from /tmp/auths/myauths.json. .PP \fB\fC# buildah push \-\-authfile /tmp/auths/myauths.json imageID docker://registry.example.com/repository:tag\fR .PP This example pushes the image specified by the imageID and puts into the local docker container store. .PP \fB\fC# buildah push imageID docker\-daemon:image:tag\fR .PP This example pushes the image specified by the imageID and puts it into the registry on the localhost while turning off tls verification. \fB\fC# buildah push \-\-tls\-verify=false imageID docker://localhost:5000/my\-imageID\fR .PP This example pushes the image specified by the imageID and puts it into the registry on the localhost using credentials and certificates for authentication. \fB\fC# buildah push \-\-cert\-dir \~/auth \-\-tls\-verify=true \-\-creds=username:password imageID docker://localhost:5000/my\-imageID\fR .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 pushing an image to a registry, if the portion of the destination image name that corresponds to a registry is compared to the items in the \fB\fCblockedRegistries\fR list, and if it matches any of them, the push attempt is denied. If there are registries in the \fB\fCallowedRegistries\fR list, and the portion of the name that corresponds to the registry is not in the list, the push 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\-login(1), containers\-policy.json(5), docker\-login(1), containers\-registries.conf(5), buildah\-manifest(1)