From c3b81371d83c3daf31aeeb821d4865e232cd6b0d Mon Sep 17 00:00:00 2001 From: Shyam Sunder Date: Sun, 19 Sep 2021 12:03:32 -0400 Subject: [PATCH] client+server/docker: fix ARM build platform issue --- .github/workflows/build-containers.yml | 4 ++-- client/Dockerfile | 4 ++-- server/Dockerfile | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-containers.yml b/.github/workflows/build-containers.yml index f808f65..518bf5b 100644 --- a/.github/workflows/build-containers.yml +++ b/.github/workflows/build-containers.yml @@ -42,7 +42,7 @@ jobs: - name: Build container run: > docker buildx build --push - --platform linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6 + --platform linux/amd64,linux/arm/v7,linux/arm64/v8 --build-arg BUILD_INFO=${{ env.build_info }} --build-arg BUILD_DATE=${{ env.build_date }} --build-arg SOURCE_COMMIT=$GITHUB_SHA @@ -93,7 +93,7 @@ jobs: - name: Build container run: > docker buildx build --push - --platform linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6 + --platform linux/amd64,linux/arm/v7,linux/arm64/v8 --build-arg BUILD_DATE=${{ env.build_date }} --build-arg SOURCE_COMMIT=$GITHUB_SHA --build-arg DOCKER_REPO=szurubooru/server diff --git a/client/Dockerfile b/client/Dockerfile index 2aeaf3b..3ab0016 100644 --- a/client/Dockerfile +++ b/client/Dockerfile @@ -1,4 +1,4 @@ -FROM node:lts as builder +FROM --platform=$BUILDPLATFORM node:lts as builder WORKDIR /opt/app COPY package.json package-lock.json ./ @@ -12,7 +12,7 @@ ARG CLIENT_BUILD_ARGS="" RUN BASE_URL="__BASEURL__" node build.js --gzip ${CLIENT_BUILD_ARGS} -FROM scratch as approot +FROM --platform=$BUILDPLATFORM scratch as approot COPY docker-start.sh / diff --git a/server/Dockerfile b/server/Dockerfile index 4beec1c..205c8e4 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -37,7 +37,7 @@ COPY ./ /opt/app/ RUN rm -rf /opt/app/szurubooru/tests -FROM prereqs as testing +FROM --platform=$BUILDPLATFORM prereqs as testing WORKDIR /opt/app RUN apk --no-cache add \