This commit is contained in:
@@ -6,6 +6,8 @@ FROM hub.diyla.com/node:${NODE_IMAGE_VERSION} AS deps
|
||||
RUN apk add --no-cache libc6-compat
|
||||
WORKDIR /app
|
||||
COPY package.json pnpm-lock.yaml ./
|
||||
# 设置 npm registry 为 npmmirror 镜像源
|
||||
RUN npm config set registry https://registry.npmmirror.com
|
||||
RUN npm install -g pnpm
|
||||
RUN pnpm install --frozen-lockfile
|
||||
|
||||
@@ -22,6 +24,8 @@ ENV BASE_PATH=$BASE_PATH
|
||||
ENV NEXT_TELEMETRY_DISABLED=1
|
||||
ENV DATABASE_URL="postgresql://user:pass@localhost:5432/dummy"
|
||||
|
||||
# 设置 npm registry 为 npmmirror 镜像源
|
||||
RUN npm config set registry https://registry.npmmirror.com
|
||||
RUN npm run build-docker
|
||||
|
||||
# Production image, copy all the files and run next
|
||||
@@ -37,6 +41,10 @@ ENV NODE_OPTIONS=$NODE_OPTIONS
|
||||
|
||||
RUN addgroup --system --gid 1001 nodejs
|
||||
RUN adduser --system --uid 1001 nextjs
|
||||
|
||||
# 设置 npm registry 为 npmmirror 镜像源
|
||||
RUN npm config set registry https://registry.npmmirror.com
|
||||
|
||||
RUN set -x \
|
||||
&& apk add --no-cache curl \
|
||||
&& npm install -g pnpm
|
||||
|
||||
Reference in New Issue
Block a user