Skip to content

Commit b614543

Browse files
committed
fix
1 parent 1cf8b30 commit b614543

File tree

35 files changed

+1442
-132
lines changed

35 files changed

+1442
-132
lines changed

.DS_Store

0 Bytes
Binary file not shown.

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ lerna-debug.log*
1313
# Diagnostic reports (https://nodejs.org/api/report.html)
1414
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
1515

16-
docs/.vuepress
16+
# docs/.vuepress
1717

1818
# Runtime data
1919
pids
@@ -95,7 +95,7 @@ dist
9595
# public
9696

9797
# vuepress build output
98-
.vuepress/dist
98+
# .vuepress/dist
9999

100100
# Serverless directories
101101
.serverless/

Dockerfile

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# 安装node
2-
FROM node:12.6.0-alpine
3-
# 设置基础镜像
4-
FROM nginx:latest
2+
# FROM node:12.6.0-alpine AS build_base
3+
FROM node AS build_base
54

65
# 标签
76
LABEL version="Beta1.0"
@@ -10,12 +9,21 @@ LABEL description="JavaScriptCollection文档合集、博客"
109
LABEL author="【Github&公众号】:Rong姐姐好可爱"
1110
LABEL email="mmdapl@163.com"
1211

13-
## 安装pnpm
14-
RUN npm install pnpm -g & pnpm install & pnpm build
12+
COPY . /apps
13+
WORKDIR /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
1520

21+
RUN find . | sed -e "s/[^-][^\/]*\// |/g" -e "s/|\([^ ]\)/|-\1/"
1622

17-
# 将dist文件中的内容复制到 /usr/share/nginx/html/ 这个目录下面
18-
COPY dist/ /usr/share/nginx/html/
23+
# 设置部署镜像
24+
FROM nginx
25+
# 将dist文件中的内容复制到 /usr/share/nginx/html/ 这个目录下面 注意:--from参数
26+
COPY --from=build_base /apps/docs/.vuepress/dist/ /usr/share/nginx/html/
1927

2028

2129
## 暴露端口

0 commit comments

Comments
 (0)