From 28190347b92dea1d74f826cfc7e1abd5ed3c7e05 Mon Sep 17 00:00:00 2001 From: Ivan-Velickovic Date: Fri, 7 Oct 2022 12:18:41 +0200 Subject: [PATCH] Make platform of image explicit This is required for non-x86 hosts Signed-off-by: Ivan-Velickovic --- Makefile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 064be58..f46d987 100644 --- a/Makefile +++ b/Makefile @@ -38,12 +38,16 @@ HOST_DIR ?= $(shell pwd) DOCKER_VOLUME_HOME ?= $(shell whoami)-home DOCKER_VOLUME_ISABELLE ?= $(shell whoami)-isabelle +# Explicitly set the default platform for the image to x86_64 Linux. +# This is required for non-x86 hosts. +DOCKER_IMG_PLATFORM ?= linux/amd64 + # Extra vars DOCKER_BUILD ?= $(DOCKER) build -DOCKER_FLAGS ?= --force-rm=true +DOCKER_FLAGS ?= --force-rm=true --platform $(DOCKER_IMG_PLATFORM) ifndef EXEC EXEC := bash - DOCKER_RUN_FLAGS += -it + DOCKER_RUN_FLAGS += -it --platform $(DOCKER_IMG_PLATFORM) endif ETC_LOCALTIME := $(realpath /etc/localtime)