1
0
mirror of https://github.com/142vip/408CSFamily.git synced 2026-02-03 10:33:47 +08:00
Files
408CSFamily/Dockerfile
妹妹下雨回不去 be28c0ff83 feat: 修改侧边栏结构,优化镜像构建脚本
- 新增docker快速打包脚本
- 主题内容优化
2023-02-07 23:13:50 +08:00

23 lines
815 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.
#
# - 功能: 408CSFamily镜像构建
# - 用法: docker build -f Dockerfile --build-arg APP_VERSION=0.0.1 -t 408CSFamily-0.0.1 .
#
## 注意vite构建需要支持node14以上安装node16较为稳妥
FROM registry.cn-hangzhou.aliyuncs.com/142vip/node:16.12.0-alpine AS build_base
RUN mkdir -p /apps
WORKDIR /apps
COPY . .
RUN npm i pnpm@6 -g && pnpm i -D && pnpm build
FROM registry.cn-hangzhou.aliyuncs.com/142vip/nginx:1.23.0-alpine
ARG APP_VERSION
LABEL version=$APP_VERSION description="408CSFamily合集"
LABEL author="【Github&公众号】Rong姐姐好可爱" email="fairy_408@2925.com"
# 将dist文件中的内容复制到 /usr/share/nginx/html/ 这个目录下面 注意:--from参数
COPY --from=build_base /apps/docs/.vuepress/dist/ /usr/share/nginx/html/
COPY nginx.conf /etc/nginx/