sincecutoff.com
← all changes

BuildKit local and tar exporters accept src

Introduced 2026-10-07 · score 0.96

HOW TO USE IT

When exporting a build result with the local or tar exporter, set `src` to the subdirectory to export; it must point to a directory within the build result.

buildctl build ... --output type=local,dest=<output-dir>,src=<build-result-subdirectory>
buildctl build ... --output type=tar,dest=<output.tar>,src=<build-result-subdirectory>

WHY THIS HELPS

Export a selected subdirectory from a build result with the local or tar exporter.

REQUIREMENTS AND LIMITATIONS

  • Version: v0.34.0
  • --output type=local (required): Select the local exporter; `dest` names its destination directory.
  • --output type=tar (required): Select the tar exporter; `dest` names its tarball destination. Tar output may also be sent to stdout.
  • src: Exporter option: path to a directory in the build result. It is resolved from the result root; relative and absolute forms are equivalent. Its contents go to the destination root. Omitting it exports the entire filesystem.
  • dest: Exporter option: destination directory or tarball path. The documented tar example also supports stdout without `dest`.
  • Prerequisite: Use a BuildKit daemon that supports `src`; older daemons may ignore the option and export the entire build result.
  • The `src` option applies to local and tar exporters.

FIRST-PARTY EVIDENCE

Check the installed version and the source before using it. Entry JSON

Report a problem with this card