Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 4 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ FROM registry.cn-hangzhou.aliyuncs.com/142vip/node:20.17.0-alpine AS build_base
# 是否配置代理
ARG NEED_PROXY=false

## 设置环境变量,支持容器构建时使用layer缓存,参考:https://pnpm.io/zh/docker
# 设置环境变量,支持容器构建时使用layer缓存,参考:https://pnpm.io/zh/docker
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"

Expand All @@ -21,10 +21,7 @@ ENV PATH="$PNPM_HOME:$PATH"
WORKDIR /apps
COPY . .

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

## 基于容器自动构建
# 基于容器自动构建
RUN --mount=type=cache,id=pnpm,target=/pnpm/store sh ./scripts/ci && \
if [ "$NEED_PROXY" = "false" ]; \
then \
Expand All @@ -33,11 +30,9 @@ RUN --mount=type=cache,id=pnpm,target=/pnpm/store sh ./scripts/ci && \
pnpm build:proxy; \
fi;

FROM registry.cn-hangzhou.aliyuncs.com/142vip/nginx:1.27.0-alpine

FROM registry.cn-hangzhou.aliyuncs.com/142vip/nginx:1.23.0-alpine


## 自定义镜像的Label信息
# 自定义镜像的Label信息
ARG APP_NAME
ARG APP_VERSION
ARG APP_DESCRIPTION
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
version: '2'
services:
JavaScriptCollection:
image: registry.cn-hangzhou.aliyuncs.com/142vip/docs:JavaScriptCollection-0.0.1
image: registry.cn-hangzhou.aliyuncs.com/142vip/docs:JavaScriptCollection-0.0.2-alpha.21
container_name: JavaScriptCollection
hostname: JavaScriptCollection
ports:
Expand Down
Loading