Docker 构建时添加 npm 镜像源

This commit is contained in:
mofeng-git 2024-08-04 12:39:17 +08:00
parent 11943d0345
commit a5e5e2b76a

View File

@ -83,7 +83,8 @@ RUN pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple &&
# https://stackoverflow.com/questions/57534295 # https://stackoverflow.com/questions/57534295
WORKDIR /root WORKDIR /root
RUN npm install htmlhint -g \ RUN npm config set registry https://registry.npmmirror.com \
&& npm install htmlhint -g \
&& npm install pug \ && npm install pug \
&& npm install pug-cli -g \ && npm install pug-cli -g \
&& npm install @babel/eslint-parser -g && npm install @babel/eslint-parser -g