fix multiplatform build

This commit is contained in:
youegraillot 2023-09-13 20:37:09 +02:00
parent 401b19ca6e
commit c7ee790f9c
2 changed files with 7 additions and 4 deletions

View File

@ -3,6 +3,8 @@ name: Docker CI
on:
workflow_dispatch:
push:
branches:
- "**"
tags-ignore:
- "v*"

View File

@ -1,8 +1,9 @@
FROM docker.io/library/node:16-alpine as deemix
FROM --platform=$TARGETPLATFORM docker.io/library/node:16-alpine as deemix
ARG TARGETPLATFORM=linux/amd64
ARG TARGETPLATFORM
ARG BUILDPLATFORM
RUN echo "Building for TARGETPLATFORM=$TARGETPLATFORM"
RUN echo "Building for TARGETPLATFORM=$TARGETPLATFORM | BUILDPLATFORM=$BUILDPLATFORM"
RUN apk add --no-cache git jq python3 make gcc musl-dev g++ && \
rm -rf /var/lib/apt/lists/*
RUN git clone --recurse-submodules https://gitlab.com/RemixDev/deemix-gui.git
@ -13,7 +14,7 @@ RUN case "$TARGETPLATFORM" in \
"linux/arm64") \
jq '.pkg.targets = ["node16-alpine-arm64"]' ./server/package.json > tmp-json ;; \
*) \
echo "Platform not supported" && exit 1 ;; \
echo "Platform $TARGETPLATFORM not supported" && exit 1 ;; \
esac && \
mv tmp-json /deemix-gui/server/package.json
RUN yarn install-all