docker buildx build --output type=docker,dest=myapp.tar -t myapp .

Category: Docker

docker buildx build --output type=docker,dest=myapp.tar -t myapp .

Export a built image to a loadable tarball

The docker output type produces a tarball that docker load can import, unlike type=oci which writes the OCI layout or type=local which copies files out. Useful when the builder cannot reach a registry and the image must be moved manually. Restore with docker load -i myapp.tar.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.