@@ -165,11 +165,12 @@ def docker_build(ctx: Context):
165
165
166
166
message_box ('Building "docker" image...' )
167
167
168
- ctx .run (
169
- "docker build -t {0}/{1}:latest -t {0}/{1}:v{2} ." .format (
170
- ORG , CONTAINER , app .__version__
168
+ for platform in ("arm64" , "amd64" ):
169
+ ctx .run (
170
+ f"docker build --platform=linux/{ platform } "
171
+ f"-t { ORG } /{ CONTAINER } :latest-{ platform } "
172
+ f"-t { ORG } /{ CONTAINER } :v{ app .__version__ } -{ platform } ."
171
173
)
172
- )
173
174
174
175
175
176
@task
@@ -210,15 +211,15 @@ def docker_run(ctx: Context):
210
211
message_box ('Running "docker" container...' )
211
212
ctx .run (
212
213
"docker run -d "
213
- "--name={1 } "
214
+ f "--name={ CONTAINER } "
214
215
"-e COLOUR_DASH_SERVER=https://www.colour-science.org:8010/ "
215
216
"-e COLOUR_DASH_CSS="
216
217
"https://www.colour-science.org/assets/css/all-nocdn.css "
217
218
"-e COLOUR_DASH_JS="
218
219
"https://www.colour-science.org/assets/js/analytics.js,"
219
220
"https://cdnjs.cloudflare.com/ajax/libs/iframe-resizer/3.6.1/"
220
221
"iframeResizer.contentWindow.min.js "
221
- "-p 8010:8000 {0 }/{1}" . format ( ORG , CONTAINER )
222
+ f "-p 8010:8000 { ORG } /{ CONTAINER } "
222
223
)
223
224
224
225
@@ -234,4 +235,4 @@ def docker_push(ctx: Context):
234
235
"""
235
236
236
237
message_box ('Pushing "docker" container...' )
237
- ctx .run (f"docker push { ORG } /{ CONTAINER } " )
238
+ ctx .run (f"docker push --all-tags { ORG } /{ CONTAINER } " )
0 commit comments