fix: revert to node:18 (cached), enable crypto via NODE_OPTIONS
Docker Hub is unreachable from server, so node:20 can't be pulled. Reverting to node:18-alpine (already cached) and using --experimental-global-webcrypto to enable globalThis.crypto. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
bbb288025a
commit
b620898bc8
|
|
@ -2,7 +2,7 @@
|
|||
# Usage: docker build --build-arg SERVICE_NAME=auth-service --build-arg SERVICE_PORT=3001 -f Dockerfile.service .
|
||||
|
||||
# ===== Build Stage =====
|
||||
FROM node:20-alpine AS builder
|
||||
FROM node:18-alpine AS builder
|
||||
|
||||
RUN corepack enable
|
||||
|
||||
|
|
@ -37,7 +37,7 @@ ARG SERVICE_NAME
|
|||
RUN pnpm turbo build --filter='./packages/shared/*' --filter=@it0/${SERVICE_NAME}
|
||||
|
||||
# ===== Production Stage =====
|
||||
FROM node:20-alpine
|
||||
FROM node:18-alpine
|
||||
|
||||
RUN corepack enable
|
||||
|
||||
|
|
@ -77,4 +77,5 @@ ARG SERVICE_PORT=3000
|
|||
EXPOSE ${SERVICE_PORT}
|
||||
|
||||
ENV SERVICE_NAME=${SERVICE_NAME}
|
||||
ENV NODE_OPTIONS="--experimental-global-webcrypto"
|
||||
CMD node dist/services/${SERVICE_NAME}/src/main
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# Next.js standalone production Dockerfile
|
||||
FROM node:20-alpine AS builder
|
||||
FROM node:18-alpine AS builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
|
|
@ -11,7 +11,7 @@ COPY . .
|
|||
RUN npm run build
|
||||
|
||||
# ===== Production =====
|
||||
FROM node:20-alpine
|
||||
FROM node:18-alpine
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue