Skip to content

Commit

Permalink
fix multiplatform build
Browse files Browse the repository at this point in the history
  • Loading branch information
youegraillot committed Sep 13, 2023
1 parent 401b19c commit c7ee790
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/docker-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name: Docker CI
on:
workflow_dispatch:
push:
branches:
- "**"
tags-ignore:
- "v*"

Expand Down
9 changes: 5 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand Down

0 comments on commit c7ee790

Please sign in to comment.