From b7c09e283058de4d73d7ddd76384679103a28bcb Mon Sep 17 00:00:00 2001 From: mitch1024 <156652908+mitch1024@users.noreply.github.com> Date: Fri, 31 May 2024 09:58:20 +0800 Subject: [PATCH] Add dockerfile for docs --- docs/Dockerfile | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 docs/Dockerfile diff --git a/docs/Dockerfile b/docs/Dockerfile new file mode 100644 index 000000000..478cfb68e --- /dev/null +++ b/docs/Dockerfile @@ -0,0 +1,12 @@ +FROM node:alpine AS builder +WORKDIR /app +COPY package.json yarn.lock ./ +RUN yarn install +COPY . . +RUN yarn run build + +FROM nginx:alpine +RUN rm -rf /usr/share/nginx/html/* +COPY --from=builder /app/.vuepress/dist /usr/share/nginx/html/docs +EXPOSE 80 +CMD ["nginx", "-g", "daemon off;"] \ No newline at end of file