File tree Expand file tree Collapse file tree 1 file changed +8
-11
lines changed
Expand file tree Collapse file tree 1 file changed +8
-11
lines changed Original file line number Diff line number Diff line change 1- # 安装node
1+ # 安装node 作为基础构建镜像
22# FROM node:12.6.0-alpine AS build_base
33FROM node AS build_base
44
5- # 标签
5+ # 镜像标签
66LABEL version="Beta1.0"
77LABEL description="JavaScriptCollection文档合集、博客"
8- # 作者
8+ # 作者信息
99LABEL author="【Github&公众号】:Rong姐姐好可爱"
1010LABEL email="mmdapl@163.com"
1111
12+ # # 确定工作空间 /apps
1213COPY . /apps
1314WORKDIR /apps
14- # # 配置cnpm
15- # RUN npm install -g cnpm --registry=https://registry.npmmirror.com && c
16- # RUN npm install -D && npm run build
17- # RUN npm install pnpm -g
18- RUN npm install
19- RUN npm run build
2015
21- RUN find . | sed -e "s/[^-][^\/ ]*\/ / |/g" -e "s/|\( [^ ]\) /|-\1 /"
16+ # # 安装依赖
17+ RUN npm install && npm run build
2218
2319# 设置部署镜像
2420FROM nginx
21+
2522# 将dist文件中的内容复制到 /usr/share/nginx/html/ 这个目录下面 注意:--from参数
2623COPY --from=build_base /apps/docs/.vuepress/dist/ /usr/share/nginx/html/
2724
2825
2926# # 暴露端口
30- EXPOSE 80
27+ EXPOSE 80
You can’t perform that action at this time.
0 commit comments