From 3bacf157939124a3eb49ebbf988f8ef731657b2b Mon Sep 17 00:00:00 2001 From: Thomas Hintz Date: Fri, 21 Apr 2023 11:08:14 +0200 Subject: [PATCH] Updating dockerfile. --- Dockerfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index b4097b8..f22238b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,7 +15,7 @@ RUN \ # Rebuild the source code only when needed -FROM node:16-alpine AS builder +FROM node:18-alpine AS builder WORKDIR /app COPY --from=deps /app/node_modules ./node_modules COPY . . @@ -31,7 +31,7 @@ COPY . . RUN npm run build # Production image, copy all the files and run next -FROM node:16-alpine AS runner +FROM node:18-alpine AS runner WORKDIR /app ENV NODE_ENV production @@ -47,6 +47,7 @@ COPY --from=builder /app/public ./public # https://nextjs.org/docs/advanced-features/output-file-tracing COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./ COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static +COPY --from=builder /app/node_modules/next/dist/compiled/jest-worker ./node_modules/next/dist/compiled/jest-worker USER nextjs