.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 DESTINATION is the location the container image is pushed to. It supports all transports from \fBcontainers-transports(5)\fR (see examples below). If no transport is specified, the \fBdocker\fR (i.e., container registry) transport is used. .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. If XDG_RUNTIME_DIR is not set, the default is /run/containers/$UID/auth.json. This file is created using \fBbuildah login\fR\&. .PP If the authorization state is not found there, $HOME/.docker/config.json is checked, which is set using \fBdocker login\fR\&. .PP Note: You can also override the default path of the authentication file by setting the REGISTRY_AUTH_FILE environment variable. \fBexport REGISTRY_AUTH_FILE=path\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--compression-format\fP \fIformat\fP .PP Specifies the compression format to use. Supported values are: \fBgzip\fR, \fBzstd\fR and \fBzstd:chunked\fR\&. .PP \fB--compression-level\fP \fIlevel\fP .PP Specify the compression level used with the compression. .PP Specifies the compression level to use. The value is specific to the compression algorithm used, e.g. for zstd the accepted values are in the range 1-20 (inclusive), while for gzip it is 1-9 (inclusive). .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--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--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--force-compression\fP .PP If set, push uses the specified compression algorithm even if the destination contains a differently-compressed variant already. Defaults to \fBtrue\fR if \fB--compression-format\fR is explicitly specified on the command-line, \fBfalse\fR otherwise. .PP \fB--format\fP, \fB-f\fP .PP Manifest Type (oci, v2s2, or v2s1) to use when pushing an image. (default is manifest type of the source image, with fallbacks) .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--retry\fP \fIattempts\fP .PP Number of times to retry in case of failure when performing push of images to registry. .PP Defaults to \fB3\fR\&. .PP \fB--retry-delay\fP \fIduration\fP .PP Duration of delay between retry attempts in case of failure when performing push of images to registry. .PP Defaults to \fB2s\fR\&. .PP \fB--rm\fP .PP When pushing a 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# 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# 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# 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# 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# 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# 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# 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 it into the local docker container store. .PP \fB# 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# buildah push --tls-verify=false imageID 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# buildah push --cert-dir ~/auth --tls-verify=true --creds=username:password imageID 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 \fBinsecureRegistries\fR, \fBblockedRegistries\fR, and \fBallowedRegistries\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 \fBblockedRegistries\fR list, and if it matches any of them, the push attempt is denied. If there are registries in the \fBallowedRegistries\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/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/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)