Skip to content

Commit c012aaf

Browse files
authored
feat: add npm mirror config support (#15)
1 parent 1c89b9d commit c012aaf

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

runtime/node.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,8 @@ FROM base AS deps
172172
WORKDIR /app
173173
COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* bun.lockb* ./
174174
ARG INSTALL_CMD={{.InstallCMD}}
175+
ARG NPM_MIRROR=
176+
RUN if [ ! -z "${NPM_MIRROR}" ]; then npm config set registry ${NPM_MIRROR}; fi
175177
RUN if [ ! -z "${INSTALL_CMD}" ]; then echo "${INSTALL_CMD}" > dep.sh; sh dep.sh; fi
176178
177179
FROM base AS builder

0 commit comments

Comments
 (0)