Browse Source

Dockerfile: use $TARGETPLATFORM

pull/1101/head
Philip H 2 years ago
committed by GitHub
parent
commit
351dacd3ab
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 5
      Dockerfile

5
Dockerfile

@ -1,8 +1,7 @@
# As a workaround we have to build on nodejs 18
# nodejs 20 hangs on build with armv6/armv7
ARG BASE_IMAGE=node:20-alpine
FROM --platform=$BUILDPLATFORM ${BASE_IMAGE} AS build_node_modules
FROM --platform=$TARGETPLATFORM ${BASE_IMAGE} AS build_node_modules
# Update npm to latest
RUN npm install -g npm@latest
@ -15,7 +14,7 @@ RUN npm ci --omit=dev &&\
# Copy build result to a new image.
# This saves a lot of disk space.
FROM --platform=$BUILDPLATFORM ${BASE_IMAGE}
FROM --platform=$TARGETPLATFORM ${BASE_IMAGE}
HEALTHCHECK CMD /usr/bin/timeout 5s /bin/sh -c "/usr/bin/wg show | /bin/grep -q interface || exit 1" --interval=1m --timeout=5s --retries=3
COPY --from=build_node_modules /app /app

Loading…
Cancel
Save