File tree Expand file tree Collapse file tree 2 files changed +22
-2
lines changed Expand file tree Collapse file tree 2 files changed +22
-2
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
3
version=$( < VERSION) # Read version of Dockerfile from file VERSION
4
- docker build " $@ " -t " openworm/openworm:$version " .
4
+
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 " .
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
3
version=$( < VERSION) # Read version of Dockerfile from file VERSION
4
- docker build " $@ " -t " openworm/openworm:$version " --no-cache .
4
+
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
+ # Rebuild the Docker image
14
+ docker build $platform_flag " $@ " -t " openworm/openworm:$version " --no-cache .
You can’t perform that action at this time.
0 commit comments