diff --git a/Dockerfile b/Dockerfile index f345b6a..f848054 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,7 +8,7 @@ WORKDIR /app COPY package.json package-lock.json ./ # Install dependencies -RUN npm install -force +RUN npm install --force # Copy the rest of the application files COPY . . @@ -22,13 +22,12 @@ FROM node:18-alpine AS runner # Set working directory inside the container WORKDIR /app -RUN mkdir -p public +RUN mkdir -p /app/public # Copy only necessary files from builder COPY --from=builder /app/package.json /app/package-lock.json ./ COPY --from=builder /app/.next ./.next -COPY --from=builder /app/public ./public -COPY --from=builder /app/public ./public || true +COPY --from=builder /app/public ./public || mkdir -p ./public COPY --from=builder /app/node_modules ./node_modules # Expose port for Next.js