Signed-off-by: sarahsanders-docker <sarah.sanders@docker.com>
1.9 KiB
1.9 KiB
docker buildx history export
Export a build into Docker Desktop bundle
Options
| Name | Type | Default | Description |
|---|---|---|---|
--all |
bool |
Export all records for the builder | |
--builder |
string |
Override the configured builder instance | |
-D, --debug |
bool |
Enable debug logging | |
-o, --output |
string |
Output file path |
Description
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.
Examples
Export a single build to a custom file
docker buildx history export qu2gsuo8ejqrwdfii23xkkckt --output mybuild.dockerbuild
You can find build IDs by running:
docker buildx history ls
Export multiple builds to individual .dockerbuild files
To 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.dockerbuild
Or use shell redirection:
docker buildx history export ^1 > mybuild.dockerbuild
docker buildx history export ^2 > backend-build.dockerbuild
Export all build records to a file
Use the --all flag and redirect the output:
docker buildx history export --all > all-builds.dockerbuild
Or use the --output flag:
docker buildx history export --all -o all-builds.dockerbuild