fix(docker): switch Alpine to Debian slim and remove prod NODE_TLS_REJECT_UNAUTHORIZED
Alpine breaks under corporate proxy TLS interception. Debian slim works reliably. NODE_TLS_REJECT_UNAUTHORIZED=0 removed from production stages — only kept in build stages where npm registries need it.
This commit is contained in:
parent
71062a57be
commit
4246d58798
@ -1,4 +1,4 @@
|
||||
FROM node:22-alpine AS builder
|
||||
FROM node:22-slim AS builder
|
||||
WORKDIR /app/backend
|
||||
|
||||
ARG GITEA_NPM_HOST
|
||||
@ -21,10 +21,9 @@ COPY shared/ ../shared/
|
||||
RUN pnpm run build
|
||||
|
||||
# Production stage
|
||||
FROM node:22-alpine
|
||||
FROM node:22-slim
|
||||
WORKDIR /app/backend
|
||||
ENV NODE_ENV=production
|
||||
ENV NODE_TLS_REJECT_UNAUTHORIZED=0
|
||||
|
||||
COPY --from=builder /app/backend/node_modules ./node_modules
|
||||
COPY --from=builder /app/backend/package.json ./package.json
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
FROM node:22-alpine AS builder
|
||||
FROM node:22-slim AS builder
|
||||
WORKDIR /app/web
|
||||
|
||||
ARG GITEA_NPM_HOST
|
||||
@ -28,11 +28,10 @@ ENV NEXT_PUBLIC_PLATFORM_SERVICE_URL=$NEXT_PUBLIC_PLATFORM_SERVICE_URL
|
||||
ENV NEXT_TELEMETRY_DISABLED=1
|
||||
RUN pnpm run build
|
||||
|
||||
FROM node:22-alpine
|
||||
FROM node:22-slim
|
||||
WORKDIR /app/web
|
||||
ENV NODE_ENV=production
|
||||
ENV NEXT_TELEMETRY_DISABLED=1
|
||||
ENV NODE_TLS_REJECT_UNAUTHORIZED=0
|
||||
|
||||
COPY --from=builder /app/web/.next/standalone ./
|
||||
COPY --from=builder /app/web/.next/static ./.next/static
|
||||
|
||||
Loading…
Reference in New Issue
Block a user