From e09ea5267a9ec6145e8cadb3a0212369e45c98f2 Mon Sep 17 00:00:00 2001 From: Joosep Alviste Date: Thu, 8 Feb 2024 16:44:16 +0200 Subject: [PATCH] build: build base Docker images for ARM Related to #83 --- packages/docker-base-images/Dockerfile.base | 2 +- packages/docker-base-images/Dockerfile.dependencies | 2 +- packages/docker-base-images/project.json | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/docker-base-images/Dockerfile.base b/packages/docker-base-images/Dockerfile.base index ae7c81f..b140147 100644 --- a/packages/docker-base-images/Dockerfile.base +++ b/packages/docker-base-images/Dockerfile.base @@ -1,3 +1,3 @@ -FROM node:20-alpine AS base +FROM --platform=$BUILDPLATFORM node:20-alpine AS base RUN npm i -g pnpm@8 diff --git a/packages/docker-base-images/Dockerfile.dependencies b/packages/docker-base-images/Dockerfile.dependencies index 1d23cf6..7b244db 100644 --- a/packages/docker-base-images/Dockerfile.dependencies +++ b/packages/docker-base-images/Dockerfile.dependencies @@ -1,4 +1,4 @@ -FROM node:20-alpine AS base +FROM --platform=$BUILDPLATFORM node:20-alpine AS base RUN npm i -g pnpm@8 diff --git a/packages/docker-base-images/project.json b/packages/docker-base-images/project.json index 61d5aa4..a1f666e 100644 --- a/packages/docker-base-images/project.json +++ b/packages/docker-base-images/project.json @@ -7,8 +7,8 @@ "options": { "cwd": "packages/docker-base-images", "commands": [ - "docker buildx build --push --cache-to type=gha,mode=max,scope=base --cache-from type=gha,scope=base -t ghcr.io/joosepalviste/serieslist-base:latest -f Dockerfile.base .", - "docker buildx build --push --cache-to type=gha,mode=max,scope=dependencies --cache-from type=gha,scope=dependencies -t ghcr.io/joosepalviste/serieslist-dependencies:latest -f Dockerfile.dependencies ." + "docker buildx build --push --cache-to type=gha,mode=max,scope=base --cache-from type=gha,scope=base -t ghcr.io/joosepalviste/serieslist-base:latest -f Dockerfile.base --platform=linux/arm64,linux/amd64 .", + "docker buildx build --push --cache-to type=gha,mode=max,scope=dependencies --cache-from type=gha,scope=dependencies -t ghcr.io/joosepalviste/serieslist-dependencies:latest -f Dockerfile.dependencies --platform=linux/arm64,linux/amd64 ." ], "parallel": true }