From c598360189403dba8f33de5258f5dcd96fa71afc Mon Sep 17 00:00:00 2001 From: hamedhosseini Date: Mon, 30 Jun 2025 11:54:06 +0330 Subject: [PATCH] fix dockerfile --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 37c845a..5b94891 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,13 +10,13 @@ WORKDIR /app COPY package*.json ./ # Install dependencies - leveraging Docker cache -RUN npm install --production --frozen-lockfile || yarn install --production --frozen-lockfile +RUN npm i --force # Copy the rest of the application code COPY . . # Build the Next.js application -RUN npm run build || yarn build +RUN npm run build # Stage 2: Production image - smaller and leaner FROM node:22-alpine AS runner @@ -26,7 +26,7 @@ WORKDIR /app # Set environment variables ENV NODE_ENV production -ENV NEXT_TELEMETRY_DISABLED 1 # Opt-out of Next.js telemetry +ENV NEXT_TELEMETRY_DISABLED 1 # Add a non-root user for security RUN addgroup -g 1001 -S nodejs