Skip to content

Commit

Permalink
Merge pull request fatwang2#23 from tudoujunha/main
Browse files Browse the repository at this point in the history
  • Loading branch information
fatwang2 authored Oct 28, 2024
2 parents 5cf1a61 + 0b96a59 commit d0dab84
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# 使用Node.js官方镜像作为基础镜像
FROM node:18-alpine

# 设置环境变量配置镜像源
ENV NPM_CONFIG_REGISTRY=https://registry.npmmirror.com/
ENV PNPM_REGISTRY=https://registry.npmmirror.com/

# 设置工作目录
WORKDIR /app

Expand All @@ -10,10 +14,6 @@ COPY package.json pnpm-lock.yaml* ./
# 安装pnpm
RUN npm install -g pnpm

# 设置npm和pnpm使用淘宝镜像源
RUN npm config set registry https://registry.npmmirror.com
RUN pnpm config set registry https://registry.npmmirror.com

# 安装依赖
RUN pnpm install

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ docker-compose down

Note: The Dockerfile uses Taobao NPM mirror, you can comment out or replace other different mirror:
```Dockerfile
# RUN npm config set registry https://registry.npmmirror.com
# RUN pnpm config set registry https://registry.npmmirror.com
ENV NPM_CONFIG_REGISTRY=https://registry.npmmirror.com/
ENV PNPM_REGISTRY=https://registry.npmmirror.com/
```

### Local Deployment
Expand Down
4 changes: 2 additions & 2 deletions README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ docker-compose down

注意:Dockerfile中使用了淘宝NPM镜像源,你可以注释掉或替换其他源:
```Dockerfile
# RUN npm config set registry https://registry.npmmirror.com
# RUN pnpm config set registry https://registry.npmmirror.com
ENV NPM_CONFIG_REGISTRY=https://registry.npmmirror.com/
ENV PNPM_REGISTRY=https://registry.npmmirror.com/
```

# 本地部署
Expand Down

0 comments on commit d0dab84

Please sign in to comment.