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.
2 parents 0f68b03 + e29a775 commit 259750bCopy full SHA for 259750b
build.sh
@@ -1,4 +1,14 @@
1
#!/bin/bash
2
3
-version=$(<VERSION) # Read version of Dockerfile from file VERSION
4
-docker build "$@" -t "openworm/openworm:$version" .
+version=$(<VERSION)
+
5
+# Set the platform flag if we're on ARM
6
+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
+# Build the Docker image
14
+docker build $platform_flag "$@" -t "openworm/openworm:$version" .
0 commit comments