From 8ad156cdb52ea66218afed64dd6045a2f42cdca3 Mon Sep 17 00:00:00 2001 From: "Lindsley, Chris" Date: Wed, 24 Jan 2024 08:55:07 -0500 Subject: [PATCH] update Makefile docker commands to support Apple Silicon machines --- CHANGELOG.md | 6 ++++++ Makefile | 8 +++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5a9a3f8..3d42e18 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,10 @@ # CHANGELOG + +## Unreleased + +* add `--platform linux/amd64` to all Docker commands in `Makefile` so `make image` and +`make container-shell` work on Apple Silicon machines + ## v18.0.0.1 * Remove terraform lockfiles to ensure easy upgrade to v18 and ratchet provider versions diff --git a/Makefile b/Makefile index 1bf9707..97c7f53 100644 --- a/Makefile +++ b/Makefile @@ -52,11 +52,17 @@ endef # --------------------------- .PHONY: image image: Dockerfile - docker build -f Dockerfile --no-cache -t cirrus-core:$(DOCKER_TAG) --target $(PYTHON_VER) --build-arg USER=`id -u` . + docker build -f Dockerfile \ + --platform linux/amd64 \ + --no-cache \ + -t cirrus-core:$(DOCKER_TAG) \ + --target $(PYTHON_VER) \ + --build-arg USER=`id -u` . .PHONY: container-shell container-shell: docker run -it --rm \ + --platform linux/amd64 \ --user `id -u` \ --env DAAC_DIR="/CIRRUS-DAAC" \ --env AWS_CONFIG_DIR="/" \