From 782d9e6d1909a44829e773368f47784eb3baba53 Mon Sep 17 00:00:00 2001 From: CrimsonTome Date: Sun, 19 Mar 2023 14:57:13 +0000 Subject: [PATCH] feat: add Dockerfile --- Dockerfile | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..a58e702 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,14 @@ +FROM node:18.14-alpine3.16 as npmpackages +WORKDIR /app +COPY package.json . +RUN npm install + +FROM node:18.14-alpine3.16 as builder +WORKDIR /app +COPY --from=npmpackages /app /app +COPY . . +RUN npm run build + +FROM nginx:1.17.10-alpine +RUN rm -r /usr/share/nginx/html/ +COPY --from=builder /app/_site/ /usr/share/nginx/html