This repository has been archived on 2024-10-29. You can view files and clone it, but cannot push or open issues or pull requests.
website/Dockerfile

22 lines
762 B
Docker
Raw Normal View History

2023-01-11 17:39:09 +01:00
FROM node:18.13.0 AS builder-dependencies
WORKDIR /usr/src/application
2021-10-24 05:19:39 +02:00
COPY ./package*.json ./
RUN npm install
2021-10-24 05:48:06 +02:00
2023-01-11 17:39:09 +01:00
FROM node:18.13.0 AS builder
WORKDIR /usr/src/application
COPY --from=builder-dependencies /usr/src/application/node_modules ./node_modules
2021-10-24 05:19:39 +02:00
COPY ./ ./
2021-10-24 05:48:06 +02:00
RUN npm run build
2021-10-24 05:19:39 +02:00
2023-01-11 17:39:09 +01:00
FROM gcr.io/distroless/nodejs18-debian11:latest AS runner
WORKDIR /usr/src/application
2021-10-24 05:48:06 +02:00
ENV NODE_ENV=production
2022-12-13 11:38:24 +01:00
ENV NEXT_TELEMETRY_DISABLED=1
2023-01-11 17:39:09 +01:00
COPY --from=builder /usr/src/application/.next/standalone ./
COPY --from=builder /usr/src/application/.next/static ./.next/static
COPY --from=builder /usr/src/application/public ./public
COPY --from=builder /usr/src/application/locales ./locales
COPY --from=builder /usr/src/application/next.config.js ./next.config.js
CMD ["./server.js"]