Movatterモバイル変換


[0]ホーム

URL:


Manuals

Image and registry exporters

Page options

Theimage exporter outputs the build result into a container image format. Theregistry exporter is identical, but it automatically pushes the result bysettingpush=true.

Synopsis

Build a container image using theimage andregistry exporters:

$ docker buildx build --outputtype=image[,parameters] .$ docker buildx build --outputtype=registry[,parameters] .

The following table describes the available parameters that you can pass to--output fortype=image:

ParameterTypeDefaultDescription
nameStringSpecify image name(s)
pushtrue,falsefalsePush after creating the image.
push-by-digesttrue,falsefalsePush image without name.
registry.insecuretrue,falsefalseAllow pushing to insecure registry.
dangling-name-prefix<value>Name image withprefix@<digest>, used for anonymous images
name-canonicaltrue,falseAdd additional canonical namename@<digest>
compressionuncompressed,gzip,estargz,zstdgzipCompression type, seecompression
compression-level0..22Compression level, seecompression
force-compressiontrue,falsefalseForcefully apply compression, seecompression
rewrite-timestamptrue,falsefalseRewrite the file timestamps to theSOURCE_DATE_EPOCH value. Seebuild reproducibility for how to specify theSOURCE_DATE_EPOCH value.
oci-mediatypestrue,falsefalseUse OCI media types in exporter manifests, seeOCI Media types
oci-artifacttrue,falsefalseAttestations are formatted as OCI artifacts, seeOCI Media types
unpacktrue,falsefalseUnpack image after creation (for use with containerd)
storetrue,falsetrueStore the result images to the worker's (for example, containerd) image store, and ensures that the image has all blobs in the content store. Ignored if the worker doesn't have image store (when using OCI workers, for example).
annotation.<key>StringAttach an annotation with the respectivekey andvalue to the built image,seeannotations

Annotations

These exporters support adding OCI annotation usingannotation parameter,followed by the annotation name using dot notation. The following example setstheorg.opencontainers.image.title annotation:

$ docker buildx build\    --output "type=<type>,name=<registry>/<image>,annotation.org.opencontainers.image.title=<title>" .

For more information about annotations, seeBuildKit documentation.

Further reading

For more information on theimage orregistry exporters, see theBuildKit README.

Edit this page

Request changes


[8]ページ先頭

©2009-2025 Movatter.jp