@@ -5,12 +5,13 @@ Export a build into Docker Desktop bundle
5
5
6
6
### Options
7
7
8
- | Name | Type | Default | Description |
9
- | :---------------------------------------| :---------| :--------| :-----------------------------------------|
10
- | [ ` --all ` ] ( #all ) | ` bool ` | | Export all records for the builder |
11
- | [ ` --builder ` ] ( #builder ) | ` string ` | | Override the configured builder instance |
12
- | [ ` -D ` ] ( #debug ) , [ ` --debug ` ] ( #debug ) | ` bool ` | | Enable debug logging |
13
- | [ ` -o ` ] ( #output ) , [ ` --output ` ] ( #output ) | ` string ` | | Output file path |
8
+ | Name | Type | Default | Description |
9
+ | :---------------------------------------| :---------| :--------| :----------------------------------------------------|
10
+ | [ ` --all ` ] ( #all ) | ` bool ` | | Export all build records for the builder |
11
+ | [ ` --builder ` ] ( #builder ) | ` string ` | | Override the configured builder instance |
12
+ | [ ` -D ` ] ( #debug ) , [ ` --debug ` ] ( #debug ) | ` bool ` | | Enable debug logging |
13
+ | [ ` --finalize ` ] ( #finalize ) | ` bool ` | | Ensure build records are finalized before exporting |
14
+ | [ ` -o ` ] ( #output ) , [ ` --output ` ] ( #output ) | ` string ` | | Output file path |
14
15
15
16
16
17
<!-- -MARKER_GEN_END-->
@@ -23,59 +24,68 @@ Desktop or shared across environments.
23
24
24
25
## Examples
25
26
26
- ### <a name =" output " ></a > Export a single build to a custom file (--output)
27
+ ### <a name =" all " ></a > Export all build records to a file (--all)
28
+
29
+ Use the ` --all ` flag and redirect the output:
27
30
28
31
``` console
29
- docker buildx history export qu2gsuo8ejqrwdfii23xkkckt --output mybuild .dockerbuild
32
+ docker buildx history export --all > all-builds .dockerbuild
30
33
```
31
34
32
- You can find build IDs by running :
35
+ Or use the ` --output ` flag :
33
36
34
37
``` console
35
- docker buildx history ls
38
+ docker buildx history export --all -o all-builds.dockerbuild
36
39
```
37
40
38
- ### <a name =" o " ></a > Export multiple builds to individual ` .dockerbuild ` files (-o)
39
-
40
- To export two builds to separate files:
41
+ ### <a name =" builder " ></a > Use a specific builder instance (--builder)
41
42
42
43
``` console
43
- # Using build IDs
44
- docker buildx history export qu2gsuo8ejqrwdfii23xkkckt qsiifiuf1ad9pa9qvppc0z1l3 -o multi.dockerbuild
45
-
46
- # Or using relative offsets
47
- docker buildx history export ^1 ^2 -o multi.dockerbuild
44
+ docker buildx history export --builder builder0 ^1 -o builder0-build.dockerbuild
48
45
```
49
46
50
- Or use shell redirection:
47
+ ### < a name = " debug " ></ a > Enable debug logging (--debug)
51
48
52
49
``` console
53
- docker buildx history export ^1 > mybuild.dockerbuild
54
- docker buildx history export ^2 > backend-build.dockerbuild
50
+ docker buildx history export --debug qu2gsuo8ejqrwdfii23xkkckt -o debug-build.dockerbuild
55
51
```
56
52
57
- ### <a name =" all " ></a > Export all build records to a file (--all )
53
+ ### <a name =" finalize " ></a > Ensure build records are finalized before exporting (--finalize )
58
54
59
- Use the ` --all ` flag and redirect the output:
55
+ Clients can report their own traces concurrently and not all traces may be
56
+ finalized when a build is completed. Use the ` --finalize ` flag to ensure all
57
+ traces are finalized before exporting. It should only be used if you are sure
58
+ that the build is completed.
60
59
61
60
``` console
62
- docker buildx history export --all > all-builds .dockerbuild
61
+ docker buildx history export --finalize qu2gsuo8ejqrwdfii23xkkckt -o finalized-build .dockerbuild
63
62
```
64
63
65
- Or use the ` --output ` flag:
64
+ ### < a name = " output " ></ a > Export a single build to a custom file ( --output)
66
65
67
66
``` console
68
- docker buildx history export --all -o all-builds .dockerbuild
67
+ docker buildx history export qu2gsuo8ejqrwdfii23xkkckt --output mybuild .dockerbuild
69
68
```
70
69
71
- ### < a name = " builder " ></ a > Use a specific builder instance (--builder)
70
+ You can find build IDs by running:
72
71
73
72
``` console
74
- docker buildx history export --builder builder0 ^1 -o builder0-build.dockerbuild
73
+ docker buildx history ls
75
74
```
76
75
77
- ### < a name = " debug " ></ a > Enable debug logging (--debug)
76
+ To export two builds to separate files:
78
77
79
78
``` console
80
- docker buildx history export --debug qu2gsuo8ejqrwdfii23xkkckt -o debug-build.dockerbuild
81
- ```
79
+ # Using build IDs
80
+ docker buildx history export qu2gsuo8ejqrwdfii23xkkckt qsiifiuf1ad9pa9qvppc0z1l3 -o multi.dockerbuild
81
+
82
+ # Or using relative offsets
83
+ docker buildx history export ^1 ^2 -o multi.dockerbuild
84
+ ```
85
+
86
+ Or use shell redirection:
87
+
88
+ ``` console
89
+ docker buildx history export ^1 > mybuild.dockerbuild
90
+ docker buildx history export ^2 > backend-build.dockerbuild
91
+ ```
0 commit comments