We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3227368 commit 4ec705aCopy full SHA for 4ec705a
1 file changed
Dockerfile
@@ -19,14 +19,13 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
19
apt-transport-https && \
20
rm -rf /var/lib/apt/lists/*
21
22
-# 设置npm淘宝镜像源并安装pnpm
23
-RUN npm config set registry https://registry.npmmirror.com && \
24
- # 安装指定版本的pnpm(可修改版本号)
25
- npm install -g pnpm@8 && \
26
- # 设置pnpm淘宝镜像源
+# 设置npm和pnpm镜像源并安装pnpm
+ENV PNPM_VERSION=8.17.0
+RUN corepack enable && \
+ corepack prepare pnpm@${PNPM_VERSION} --activate && \
+ npm config set registry https://registry.npmmirror.com && \
27
pnpm config set registry https://registry.npmmirror.com && \
28
- # 清理缓存减小镜像体积
29
- npm cache clean --force && \
30
- pnpm store prune
+ pnpm config set store-dir /pnpm-store && \
+ rm -rf /tmp/* /root/.npm /root/.cache
31
32
CMD [ "/bin/bash" ]
0 commit comments