19 lines
493 B
Docker
19 lines
493 B
Docker
# build environment
|
|
FROM --platform=$BUILDPLATFORM node:20.8.1-alpine3.18 as build-stage
|
|
RUN mkdir /app && chown -R node:node /app
|
|
WORKDIR /app
|
|
RUN apk add --no-cache python3 make g++
|
|
USER node
|
|
COPY --link --chown=1000:1000 package*.json ./
|
|
RUN SKIP_BUILD=true npm ci
|
|
COPY --link --chown=1000:1000 . .
|
|
|
|
ARG SERVERS
|
|
ARG VERSION
|
|
|
|
RUN npm run build
|
|
|
|
# production environment
|
|
FROM nginx:1.27.0-alpine as production-stage
|
|
COPY --chown=nginx:nginx --from=build-stage /app/dist /usr/share/nginx/html
|