ci: use buildx bake in docker build job

Part-of: <https://dev.funkwhale.audio/funkwhale/funkwhale/-/merge_requests/2350>
This commit is contained in:
jo 2023-02-12 13:53:42 +01:00
commit a63c9db168
7 changed files with 83 additions and 57 deletions

View file

@ -1,8 +1,4 @@
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
FROM --platform=linux/amd64 node:18-alpine as builder
WORKDIR /app
COPY package.json yarn.lock /app/
@ -16,7 +12,7 @@ RUN yarn install
RUN yarn build:deployment
FROM nginx:1.23.4-alpine as final
FROM nginx:1.23.4-alpine as production
COPY --from=builder /app/dist /usr/share/nginx/html
COPY docker/funkwhale.conf.template /etc/nginx/templates/default.conf.template