Skip to content

Commit 0f686f3

Browse files
committed
fix: 修复Dockerfile构建异常,增加git国内下载
1 parent 03023a3 commit 0f686f3

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

Dockerfile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,14 @@ ARG NEED_PROXY=false
1515
ENV PNPM_HOME="/pnpm"
1616
ENV PATH="$PNPM_HOME:$PATH"
1717

18-
## corepack 环境变量
18+
## corepack 环境变量,在CI脚本中直接设置
1919
#ENV COREPACK_NPM_REGISTRY=https://mirrors.tencent.com/npm/
2020

2121
WORKDIR /apps
2222
COPY . .
2323

24-
RUN ls
24+
## 安装git,博客编译需要使用git信息
25+
RUN apk add --no-cache git --repository http://mirrors.aliyun.com/alpine/v3.14/main/
2526

2627
## 基于容器自动构建
2728
RUN --mount=type=cache,id=pnpm,target=/pnpm/store sh ./scripts/ci && if [ "$NEED_PROXY" = "false" ]; \
@@ -51,5 +52,5 @@ LABEL "repo.name"=$APP_NAME "repo.version"=$APP_VERSION \
5152
LABEL "git.hash"="$GIT_HASH"
5253

5354
# 将dist文件中的内容复制到 /usr/share/nginx/html/ 这个目录下面 注意:--from参数
54-
COPY --from=build_base /apps/docs/.vuepress/dist/ /usr/share/nginx/html/
55-
COPY nginx.conf /etc/nginx/
55+
COPY --from=build_base /apps/docs/.vuepress/dist/ /usr/share/nginx/html/
56+
COPY --from=build_base /apps/nginx.conf /etc/nginx/

scripts/bundle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ import {
4141
['HOME_PAGE', pkg.authorInfo.homePage],
4242
['GIT_HASH', gitHash],
4343
],
44+
memory:20000,
4445
push: true,
4546
delete: true,
4647
logger: true,

0 commit comments

Comments
 (0)