DOCKER-BUILDX-IMAGETOOLS-CREATE(1)
π NAME π
okay so bestie, gather round β this is docker-buildx-imagetools-create(1), and its whole thing is: create a new image based on source images. that's the job. that's the assignment. and it ate. π
π SYNOPSIS π
docker buildx imagetools create [OPTIONS] [SOURCE] [SOURCE...]
π¦ DESCRIPTION π¦
So here's the vibe: you're making a brand new manifest list out of your source manifests. β¨
Those source manifests can be manifest lists or single platform distribution manifests β and they must already exist in the registry where the new manifest is being created. like, no showing up empty-handed, the registry needs to already know them. π βοΈ
And if you only pass in one source? create just does a carbon copy. literally a copy-paste with zero extra drama. periodt. π
π OPTIONS π
--annotation=[]β add an annotation to the image--append[=false]β append to an existing manifest--dry-run[=false]β show the final image instead of pushing it-f,--file=[]β read the source descriptor from a file-h,--help[=false]β help forcreate--progress="auto"β set the type of progress output ("auto","plain","tty"). useplainto show container output-t,--tag=[]β set the reference for the new image
π OPTIONS INHERITED FROM PARENT COMMANDS π
--builder=""β override the configured builder instance
π₯ EXAMPLE π₯
π
Add annotations to an image (--annotation) {#annotation}
the --annotation flag is your girl for adding annotations to the image index, the manifest, and the descriptors when you're creating a new image. π«Ά
this next command creates a foo/bar:latest image with the org.opencontainers.image.authors annotation sitting pretty on the image index:
$ docker buildx imagetools create \
--annotation "index:org.opencontainers.image.authors=dvdksn" \
--tag foo/bar:latest \
foo/bar:alpha foo/bar:beta foo/bar:gamma
Note π theimagetools createcommand supports adding annotations to the image index and descriptor, using these type prefixes: -index:-manifest-descriptor:It does not support annotating manifests or OCI layouts. π
want the full lore on annotations? see Annotations at /build/building/annotations/.
πΈ Append new sources to an existing manifest list (--append) {#append}
use the --append flag to append the new sources onto an existing manifest list in the destination. yes bestie, you can keep stacking. π§
β Override the configured builder instance (--builder) {#builder}
same as /reference/cli/docker/buildx/#builder.
π Show final image instead of pushing (--dry-run) {#dry-run}
use the --dry-run flag to not push the image β it just shows it to you. peek, don't yeet. π
π Read source descriptor from a file (-f, --file) {#file}
-f FILE or --file FILE
reads source from files. a source can be a manifest digest, a manifest reference, or a JSON of OCI descriptor object. π
and if you want to define annotations or extra platform properties like os.version and os.features, you need to add them into the OCI descriptor object encoded in JSON. that's the only way in, iykyk.
$ docker buildx imagetools inspect --raw alpine | jq '.manifests[0] | .platform."os.version"="10.1"' > descr.json
$ docker buildx imagetools create -f descr.json myuser/image
the descriptor in the file gets merged with the existing descriptor in the registry if it exists. π«Ά
the supported fields for the descriptor are defined in the OCI spec at https://github.com/opencontainers/image-spec/blob/master/descriptor.md#properties.
π Set reference for new image (-t, --tag) {#tag}
-t IMAGE or --tag IMAGE
use -t or --tag to set the name of the image you're creating. name it, claim it, own it. π
$ docker buildx imagetools create --dry-run alpine@sha256:5c40b3c27b9f13c873fefb2139765c56ce97fd50230f1f2d5c91e55dec171907 sha256:c4ba6347b0e4258ce6a6de2401619316f982b7bcc529f73d2a410d0097730204
$ docker buildx imagetools create -t tonistiigi/myapp -f image1 -f image2
π SEE ALSO π
and that's the whole page bestie, we're done here π this one's the Apr 2025 version of docker-buildx-imagetools-create(1) β go forth and build your manifest lists, you absolute icon. πβ¨π¦
π¦ where this page comes from
- debian trixie: docker-buildx 0.13.1+ds1-3 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms