Skip to content

Commit

Permalink
Set variable ARCH to amd64 if arm64 is arch
Browse files Browse the repository at this point in the history
Signed-off-by: xichen1 <[email protected]>
  • Loading branch information
xichen1 committed Mar 25, 2023
1 parent eb5c65b commit 5017917
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ YELLOW := $(shell tput -Txterm setaf 3)
RESET := $(shell tput -Txterm sgr0)
ARCH := $(shell uname -m)

# set the arm64 ARCH to amd64 for compatibility reason
ifeq ($(ARCH), arm64)
ARCH := amd64
endif

#Set the source of PIP in docker agent image
PIP=pip.conf.bak

Expand All @@ -46,6 +51,7 @@ DOCKER_BASE_x86_64=python:3.6
DOCKER_BASE_ppc64le=ppc64le/python:3.6
DOCKER_BASE_s390x=s390x/python:3.6
DOCKER_BASE_arm64=python:3.6
DOCKER_BASE_amd64=python:3.6
DOCKER_BASE=$(DOCKER_BASE_$(ARCH))
BASE_VERSION ?= $(ARCH)-$(VERSION)

Expand Down Expand Up @@ -211,11 +217,7 @@ stop-docker-compose:
images: api-engine docker-rest-agent fabric dashboard

api-engine:
if [ "$(ARCH)" = "arm64" ]; then \
docker build -t hyperledger/cello-api-engine:latest -f build_image/docker/common/api-engine/Dockerfile.in ./ --platform linux/amd64; \
else \
docker build -t hyperledger/cello-api-engine:latest -f build_image/docker/common/api-engine/Dockerfile.in ./ --platform linux/$(ARCH); \
fi
docker build -t hyperledger/cello-api-engine:latest -f build_image/docker/common/api-engine/Dockerfile.in ./ --platform linux/$(ARCH)

docker-rest-agent:
docker build -t hyperledger/cello-agent-docker:latest -f build_image/docker/agent/docker-rest-agent/Dockerfile.in ./ --build-arg pip=$(PIP) --platform linux/$(ARCH)
Expand Down

0 comments on commit 5017917

Please sign in to comment.