2023-02-13 19:29:12 +00:00
|
|
|
FROM node:18-alpine3.17 as npmpackages
|
2022-06-05 15:43:31 +01:00
|
|
|
WORKDIR /app
|
|
|
|
COPY package.json .
|
|
|
|
RUN npm install
|
|
|
|
|
2023-02-13 19:29:12 +00:00
|
|
|
FROM node:18-alpine3.17 as builder
|
2022-06-05 15:43:31 +01:00
|
|
|
WORKDIR /app
|
|
|
|
COPY --from=npmpackages /app /app
|
|
|
|
COPY . .
|
|
|
|
RUN npm run build
|
|
|
|
|
2023-02-13 19:29:12 +00:00
|
|
|
FROM nginx:stable-alpine
|
2022-06-05 15:43:31 +01:00
|
|
|
RUN rm -r /usr/share/nginx/html/
|
|
|
|
COPY --from=builder /app/_site/ /usr/share/nginx/html/
|
|
|
|
|