Skip to content

Commit

Permalink
fix make docker not building amd64 image when running on arm
Browse files Browse the repository at this point in the history
Signed-off-by: Yilun <[email protected]>
  • Loading branch information
yilunzhang committed May 15, 2024
1 parent d66c4b3 commit dff2b99
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ test:

.PHONY: docker
docker:
docker build -f docker/Dockerfile -t nknorg/nkn:latest-amd64 .
docker build -f docker/Dockerfile --build-arg build_args="build GOOS=linux GOARCH=amd64 BUILD_DIR=. BIN_DIR=." --build-arg base="amd64/" -t nknorg/nkn:latest-amd64 .
docker build -f docker/Dockerfile --build-arg build_args="build GOOS=linux GOARCH=arm GOARM=6 BUILD_DIR=. BIN_DIR=." --build-arg base="arm32v6/" -t nknorg/nkn:latest-arm32v6 .
docker build -f docker/Dockerfile --build-arg build_args="build GOOS=linux GOARCH=arm64 BUILD_DIR=. BIN_DIR=." --build-arg base="arm64v8/" -t nknorg/nkn:latest-arm64v8 .

Expand All @@ -111,6 +111,7 @@ docker_publish:
docker push nknorg/nkn:latest-arm32v6
docker push nknorg/nkn:latest-arm64v8
DOCKER_CLI_EXPERIMENTAL=enabled docker manifest create nknorg/nkn:latest nknorg/nkn:latest-amd64 nknorg/nkn:latest-arm32v6 nknorg/nkn:latest-arm64v8 --amend
DOCKER_CLI_EXPERIMENTAL=enabled docker manifest annotate nknorg/nkn:latest nknorg/nkn:latest-amd64 --os linux --arch amd64
DOCKER_CLI_EXPERIMENTAL=enabled docker manifest annotate nknorg/nkn:latest nknorg/nkn:latest-arm32v6 --os linux --arch arm
DOCKER_CLI_EXPERIMENTAL=enabled docker manifest annotate nknorg/nkn:latest nknorg/nkn:latest-arm64v8 --os linux --arch arm64
DOCKER_CLI_EXPERIMENTAL=enabled docker manifest push -p nknorg/nkn:latest

0 comments on commit dff2b99

Please sign in to comment.