We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1abda59 commit d36a9feCopy full SHA for d36a9fe
build.sh
@@ -1,6 +1,6 @@
1
#!/bin/bash
2
3
-version=$(<VERSION)
+version=$(<VERSION) # Read version of Dockerfile from file VERSION
4
5
# Set the platform flag if we're on ARM
6
arch=$(uname -m)
rebuild.sh
@@ -1,4 +1,14 @@
version=$(<VERSION) # Read version of Dockerfile from file VERSION
-docker build "$@" -t "openworm/openworm:$version" --no-cache .
+
+# Set the platform flag if we're on ARM
+arch=$(uname -m)
7
+if [[ "$arch" == "arm64" || "$arch" == "aarch64" ]]; then
8
+ platform_flag="--platform linux/amd64"
9
+else
10
+ platform_flag=""
11
+fi
12
13
+# Rebuild the Docker image
14
+docker build $platform_flag "$@" -t "openworm/openworm:$version" --no-cache .
0 commit comments