Skip to content

Commit d79c799

Browse files
committed
force platform
1 parent b201080 commit d79c799

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

.github/workflows/build_multi_arch_image.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ jobs:
7272
DOCKER_TAG: '${{ inputs.docker_tag }}'
7373
CONTAINER_NAME: '${{ inputs.container_name }}'
7474
BASE_VERSION: ${{ inputs.docker_tag}}
75+
PLATFORM: linux/${{ matrix.arch }}
7576
- uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f
7677
name: Upload combined trivy ignore file
7778
with:

Makefile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
CONTAINER_PREFIX=ghcr.io/nhsdigital/eps-devcontainers/
22

3+
ifneq ($(strip $(PLATFORM)),)
4+
PLATFORM_FLAG=--platform $(PLATFORM)
5+
endif
6+
37
guard-%:
48
@ if [ "${${*}}" = "" ]; then \
59
echo "Environment variable $* not set"; \
@@ -17,10 +21,11 @@ install-node:
1721
install-hooks: install-python
1822
poetry run pre-commit install --install-hooks --overwrite
1923

20-
build-image: guard-CONTAINER_NAME guard-BASE_VERSION
24+
build-image: guard-CONTAINER_NAME guard-BASE_VERSION guard-PLATFORM
2125
npx devcontainer build \
2226
--workspace-folder ./src/$${CONTAINER_NAME}/ \
2327
--push false \
28+
--platform $${PLATFORM} \
2429
--image-name "${CONTAINER_PREFIX}$${CONTAINER_NAME}"
2530

2631
scan-image: guard-CONTAINER_NAME

0 commit comments

Comments
 (0)