Skip to content

Commit

Permalink
Multiarch builds
Browse files Browse the repository at this point in the history
  • Loading branch information
adamrdrew committed Nov 6, 2023
1 parent 9490d1c commit 04a9d97
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
9 changes: 1 addition & 8 deletions build_deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,4 @@ if [[ "$VALID_TAGS_LENGTH" -eq 0 ]]; then
fi
#### End

docker --config="$DOCKER_CONF" build --platform linux/amd64 --build-arg BASE_IMAGE="$BASE_IMG" --build-arg GOARCH="amd64" -t "${IMAGE}:${IMAGE_TAG}-amd64" --push .
docker --config="$DOCKER_CONF" build --platform linux/arm64 --build-arg BASE_IMAGE="$BASE_IMG" --build-arg GOARCH="arm64" -t "${IMAGE}:${IMAGE_TAG}-arm64" --push .

docker --config="$DOCKER_CONF" manifest create "${IMAGE}:${IMAGE_TAG}" \
"${IMAGE}:${IMAGE_TAG}-amd64" \
"${IMAGE}:${IMAGE_TAG}-arm64"

docker --config="$DOCKER_CONF" manifest push "${IMAGE}:${IMAGE_TAG}"
docker --config="$DOCKER_CONF" buildx build --platform linux/amd64,linux/arm64 --build-arg BASE_IMAGE="$BASE_IMG" -t "${IMAGE}:${IMAGE_TAG}" --push .
3 changes: 2 additions & 1 deletion pr_check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ docker rm -f $CONTAINER_NAME-run
# This confused me for a while because pr_check_inner.sh is also copied into the pr check container at build time
# but the template_check.sh isn't. I couldn't figure out how it was sourcing it

docker build -t $CONTAINER_NAME -f build/Dockerfile.pr .
docker buildx build --platform linux/amd64,linux/arm64 -t $CONTAINER_NAME -f build/Dockerfile.pr .
docker buildx build --load -t $CONTAINER_NAME -f build/Dockerfile.pr .

docker run -i --name $CONTAINER_NAME-run -v $PWD:/workspace:ro $CONTAINER_NAME /workspace/build/pr_check_inner.sh

Expand Down

0 comments on commit 04a9d97

Please sign in to comment.