Local and tar exporters

The local and tar exporters output the root filesystem of the build result into a local directory. They're useful for producing artifacts that aren't container images.

  • local exports files and directories.
  • tar exports the same, but bundles the export into a tarball.


Build a container image using the local exporter:

$ docker buildx build --output type=local[,parameters] .
$ docker buildx build --output type=tar[,parameters] .

The following table describes the available parameters:

destStringPath to copy files to

Further reading

For more information on the local or tar exporters, see the BuildKit README.