forked from rook/rook
Fix Rook NFS image cross-build issue on AArch64
We need to pull the base image for arm64, not for amd64. This PR add prefix `arm64v8` of `fedora:26` to pull the image for arm64. Signed-off-by: Dennis Chen <dennis.chen@arm.com>
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
|
||||
#Portions of this file came from https://github.com/kubernetes-incubator/external-storage/blob/master/nfs/deploy/docker/Dockerfile, which uses the same license.
|
||||
|
||||
FROM fedora:26
|
||||
FROM NFS_BASEIMAGE
|
||||
|
||||
# Build ganesha from source, installing deps and removing them in one line.
|
||||
# Why?
|
||||
|
||||
@@ -19,6 +19,14 @@ include ../image.mk
|
||||
|
||||
NFS_IMAGE = $(BUILD_REGISTRY)/nfs-$(GOARCH)
|
||||
|
||||
NFS_BASE ?= fedora:26
|
||||
|
||||
ifeq ($(GOARCH),amd64)
|
||||
NFS_BASEIMAGE = $(NFS_BASE)
|
||||
else ifeq ($(GOARCH),arm64)
|
||||
NFS_BASEIMAGE = arm64v8/$(NFS_BASE)
|
||||
endif
|
||||
|
||||
TEMP := $(shell mktemp -d)
|
||||
|
||||
# ====================================================================================
|
||||
@@ -35,6 +43,7 @@ do.build:
|
||||
@cp Dockerfile $(TEMP)
|
||||
@cp start.sh $(TEMP)
|
||||
@cp $(OUTPUT_DIR)/bin/linux_$(GOARCH)/rook $(TEMP)
|
||||
@cd $(TEMP) && $(SED_CMD) 's|NFS_BASEIMAGE|$(NFS_BASEIMAGE)|g' Dockerfile
|
||||
@docker build $(BUILD_ARGS) \
|
||||
-t $(NFS_IMAGE) \
|
||||
$(TEMP)
|
||||
|
||||
Reference in New Issue
Block a user