File tree Expand file tree Collapse file tree
apps/recommendation-service Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# ---- Base Stage ----
2- FROM node:20-alpine AS base
2+ FROM node:20-slim AS base
33ENV PNPM_HOME="/pnpm"
44ENV PATH="$PNPM_HOME:$PATH"
55ENV NX_DAEMON=false
@@ -43,15 +43,15 @@ COPY --from=builder /app/node_modules/.prisma ./node_modules/.prisma
4343COPY --from=builder /app/node_modules/@prisma/client ./node_modules/@prisma/client
4444
4545# ---- Runner Stage ----
46- FROM node:20-alpine AS runner
46+ FROM node:20-slim AS runner
4747WORKDIR /app
4848
4949ENV NODE_ENV=production
5050ENV PORT=6007
5151
52- RUN apk add --no-cache dumb-init
52+ RUN apt-get update && apt-get install -y dumb-init && rm -rf /var/lib/apt/lists/*
5353
54- RUN addgroup -g 1001 -S nodejs && adduser -S nodejs -u 1001
54+ RUN groupadd -g 1001 nodejs && useradd -u 1001 -g nodejs -m -s /bin/sh nodejs
5555
5656COPY --from=builder /app/apps/recommendation-service/dist/main.js ./main.js
5757COPY --from=prod-deps /app/node_modules ./node_modules
You can’t perform that action at this time.
0 commit comments