File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change 7
7
import tempfile
8
8
9
9
from iso8601 import parse_date
10
- from traitlets import Dict
10
+ from traitlets import Dict , List , Unicode
11
11
12
12
import docker
13
13
@@ -74,6 +74,15 @@ class DockerEngine(ContainerEngine):
74
74
config = True ,
75
75
)
76
76
77
+ extra_buildx_build_args = List (
78
+ Unicode ,
79
+ [],
80
+ help = """
81
+ Extra commandline arguments to pass to `docker buildx build` when building the image.
82
+ """ ,
83
+ help = True
84
+ )
85
+
77
86
def __init__ (self , * , parent ):
78
87
super ().__init__ (parent = parent )
79
88
try :
@@ -123,6 +132,9 @@ def build(
123
132
if platform :
124
133
args += ["--platform" , platform ]
125
134
135
+ # place extra args right *before* the path
136
+ args += self .extra_buildx_build_args
137
+
126
138
if fileobj :
127
139
with tempfile .TemporaryDirectory () as d :
128
140
tarf = tarfile .open (fileobj = fileobj )
You can’t perform that action at this time.
0 commit comments