1
0
mirror of https://github.com/142vip/408CSFamily.git synced 2026-02-13 15:26:57 +08:00
Files
408CSFamily/Dockerfile
喜欢芝士的妹妹 e2b229ff03 feat(docs):新增文档
2022-06-23 08:53:19 +08:00

20 lines
787 B
Docker
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
## 注意vite构建需要支持node14以上安装node16较为稳妥
FROM registry.cn-hangzhou.aliyuncs.com/142vip/node:16.12.0-alpine AS build_base
LABEL version="Beta1.0" description="408CSFamily合集"
LABEL author="【Github&公众号】Rong姐姐好可爱" email="fairy@2925.com"
RUN mkdir -p /apps
## 确定工作空间 /apps
COPY . /apps
WORKDIR /apps
## 安装依赖
RUN npm ci --registry https://registry.npmmirror.com && npm run build
# 设置部署镜像
FROM registry.cn-hangzhou.aliyuncs.com/142vip/nginx:latest
# 将dist文件中的内容复制到 /usr/share/nginx/html/ 这个目录下面 注意:--from参数
COPY --from=build_base /apps/docs/.vuepress/dist/ /usr/share/nginx/html/
COPY nginx.conf /etc/nginx/
EXPOSE 7000
CMD ["nginx", "-g", "daemon off;"]