Skip to content

Commit 3c2c2c7

Browse files
committed
Build docker images for linux/arm64
1 parent 4ea189a commit 3c2c2c7

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

.circleci/config.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ jobs:
5858
GOOS=darwin GOARCH=amd64 go build -o ./release/${cmd}_${version}_darwin_amd64 ./cmd/${cmd}
5959
GOOS=darwin GOARCH=arm64 go build -o ./release/${cmd}_${version}_darwin_arm64 ./cmd/${cmd}
6060
GOOS=windows GOARCH=amd64 go build -o ./release/${cmd}_${version}_windows_amd64.exe ./cmd/${cmd}
61+
GOOS=windows GOARCH=arm64 go build -o ./release/${cmd}_${version}_windows_arm64.exe ./cmd/${cmd}
6162
done
6263
- run: |
6364
mkdir -p release
@@ -88,8 +89,12 @@ jobs:
8889
- checkout
8990
- setup_remote_docker
9091
- run: |
92+
docker buildx create \
93+
--name container-builder \
94+
--driver docker-container \
95+
--bootstrap --use
9196
for cmd in << pipeline.parameters.cmds >>; do
92-
docker build --build-arg cmd=${cmd} -t robocupssl/${cmd}:latest .
97+
docker buildx build --platform linux/amd64,linux/arm64 --build-arg cmd=${cmd} -f ./cmd/${cmd}/Dockerfile -t robocupssl/${cmd}:latest .
9398
done
9499
95100
publish_docker:
@@ -104,7 +109,7 @@ jobs:
104109
TAG=${CIRCLE_TAG:1}
105110
TAG=${TAG:-latest}
106111
for cmd in << pipeline.parameters.cmds >>; do
107-
docker build --build-arg cmd=${cmd} -t robocupssl/${cmd}:${TAG} .
112+
docker buildx build --platform linux/amd64,linux/arm64 --build-arg cmd=${cmd} -f ./cmd/${cmd}/Dockerfile -t robocupssl/${cmd}:${TAG} .
108113
docker login -u "${DOCKER_HUB_USERNAME}" -p "${DOCKER_HUB_PASSWORD}"
109114
docker push robocupssl/${cmd}:${TAG}
110115
done

0 commit comments

Comments
 (0)