feat(front/Dockerfile): cross-build on native platform

Part-of: <https://dev.funkwhale.audio/funkwhale/funkwhale/-/merge_requests/2194>
This commit is contained in:
JuniorJPDJ 2022-11-23 23:48:14 +01:00 committed by Kasper Seweryn
parent 9ff2e70325
commit adaf99272c
2 changed files with 6 additions and 1 deletions

View File

@ -0,0 +1 @@
Build frontend natively for cross-arch docker images

View File

@ -1,4 +1,8 @@
FROM node:18-alpine as builder
ARG BUILDPLATFORM=linux/amd64
# default to building on linux/amd64 for legacy builders
# docker buildx overwrites this ARG
FROM --platform=$BUILDPLATFORM node:18-alpine as builder
WORKDIR /app
COPY package.json yarn.lock /app/