修改docker部署
Some checks failed
Node.js CI / build (push) Has been cancelled

This commit is contained in:
apple
2026-03-14 16:09:59 +08:00
parent f0eb19c417
commit 50e29f88f1

View File

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