Skip to content

Commit 5a16a9b

Browse files
committed
Ensure that proper docker architecture can be run.
1 parent a9bfdf4 commit 5a16a9b

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

tasks.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
==============
44
"""
55

6+
import platform
7+
68
from invoke import Context, task
79
from invoke.exceptions import Failure
810

@@ -165,12 +167,12 @@ def docker_build(ctx: Context):
165167

166168
message_box('Building "docker" image...')
167169

168-
for platform in ("arm64", "amd64"):
170+
for archictecture in ("arm64", "amd64"):
169171
ctx.run(
170-
f"docker build --platform=linux/{platform} "
172+
f"docker build --platform=linux/{archictecture} "
171173
f"-t {ORG}/{CONTAINER}:latest "
172-
f"-t {ORG}/{CONTAINER}:latest-{platform} "
173-
f"-t {ORG}/{CONTAINER}:v{app.__version__}-{platform} ."
174+
f"-t {ORG}/{CONTAINER}:latest-{archictecture} "
175+
f"-t {ORG}/{CONTAINER}:v{app.__version__}-{archictecture} ."
174176
)
175177

176178

@@ -220,7 +222,7 @@ def docker_run(ctx: Context):
220222
"https://www.colour-science.org/assets/js/analytics.js,"
221223
"https://cdnjs.cloudflare.com/ajax/libs/iframe-resizer/3.6.1/"
222224
"iframeResizer.contentWindow.min.js "
223-
f"-p 8010:8000 {ORG}/{CONTAINER}"
225+
f"-p 8010:8000 {ORG}/{CONTAINER}:latest-{platform.uname()[4].lower()}"
224226
)
225227

226228

0 commit comments

Comments
 (0)