Export build records into Docker Desktop bundle
| Name | Type | Default | Description |
|---|---|---|---|
--all |
bool |
Export all build records for the builder | |
--builder |
string |
Override the configured builder instance | |
-D, --debug |
bool |
Enable debug logging | |
--finalize |
bool |
Ensure build records are finalized before exporting | |
-o, --output |
string |
Output file path |
Export one or more build records to .dockerbuild archive files. These archives
contain metadata, logs, and build outputs, and can be imported into Docker
Desktop or shared across environments.
Use the --all flag and redirect the output:
docker buildx history export --all > all-builds.dockerbuildOr use the --output flag:
docker buildx history export --all -o all-builds.dockerbuilddocker buildx history export --builder builder0 ^1 -o builder0-build.dockerbuilddocker buildx history export --debug qu2gsuo8ejqrwdfii23xkkckt -o debug-build.dockerbuildClients can report their own traces concurrently, and not all traces may be
saved yet by the time of the export. Use the --finalize flag to ensure all
traces are finalized before exporting.
docker buildx history export --finalize qu2gsuo8ejqrwdfii23xkkckt -o finalized-build.dockerbuilddocker buildx history export qu2gsuo8ejqrwdfii23xkkckt --output mybuild.dockerbuildYou can find build IDs by running:
docker buildx history lsTo export two builds to separate files:
# Using build IDs
docker buildx history export qu2gsuo8ejqrwdfii23xkkckt qsiifiuf1ad9pa9qvppc0z1l3 -o multi.dockerbuild
# Or using relative offsets
docker buildx history export ^1 ^2 -o multi.dockerbuildOr use shell redirection:
docker buildx history export ^1 > mybuild.dockerbuild
docker buildx history export ^2 > backend-build.dockerbuild