diff --git a/Dockerfile b/Dockerfile index 6367e3a21..88b07eea4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,9 +10,9 @@ RUN apk add --no-cache \ # Download the Firecracker binary from Github ARG FIRECRACKER_VERSION -# If amd64 is set, this is "". If arm64, this should be "-aarch64". -ARG ARCH_SUFFIX -RUN wget -q -O /usr/local/bin/firecracker https://github.com/firecracker-microvm/firecracker/releases/download/${FIRECRACKER_VERSION}/firecracker-${FIRECRACKER_VERSION}${ARCH_SUFFIX} +# If amd64 is set, this is "-x86_64". If arm64, this should be "-aarch64". +ARG FIRECRACKER_ARCH_SUFFIX +RUN wget -q -O /usr/local/bin/firecracker https://github.com/firecracker-microvm/firecracker/releases/download/${FIRECRACKER_VERSION}/firecracker-${FIRECRACKER_VERSION}${FIRECRACKER_ARCH_SUFFIX} # Add ignite-spawn to the image ADD ./ignite-spawn /usr/local/bin/ignite-spawn diff --git a/Makefile b/Makefile index bf39c5a59..22e69ee5b 100644 --- a/Makefile +++ b/Makefile @@ -57,12 +57,12 @@ export DOCKER_CLI_EXPERIMENTAL := enabled ifeq ($(GOARCH),amd64) QEMUARCH=amd64 BASEIMAGE=alpine:3.9 -ARCH_SUFFIX= +FIRECRACKER_ARCH_SUFFIX=-x86_64 endif ifeq ($(GOARCH),arm64) QEMUARCH=aarch64 BASEIMAGE=arm64v8/alpine:3.9 -ARCH_SUFFIX=-aarch64 +FIRECRACKER_ARCH_SUFFIX=-aarch64 endif E2E_REGEX := Test @@ -99,7 +99,7 @@ else endif $(DOCKER) build -t $(IMAGE):${IMAGE_DEV_TAG}-$(GOARCH) \ --build-arg FIRECRACKER_VERSION=${FIRECRACKER_VERSION} \ - --build-arg ARCH_SUFFIX=${ARCH_SUFFIX} bin/$(GOARCH) + --build-arg FIRECRACKER_ARCH_SUFFIX=${FIRECRACKER_ARCH_SUFFIX} bin/$(GOARCH) # Load the dev image into the host's containerd content store $(DOCKER) image save $(IMAGE):${IMAGE_DEV_TAG}-$(GOARCH) \ | $(CTR) -n firecracker image import -