diff --git a/Dockerfile b/Dockerfile index 9fe98fa..f4a5bb3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ # Install dependencies only when needed FROM node:18-alpine AS deps # Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed. -RUN apk add --no-cache libc6-compat +RUN apk add libc6-compat WORKDIR /app # Install dependencies based on the preferred package manager @@ -43,6 +43,9 @@ RUN adduser --system --uid 1001 nextjs COPY --from=builder /app/public ./public +# Allow the server to see the environment variables +COPY --from=builder /app/.env.pruduction ./.env.pruduction + # Automatically leverage output traces to reduce image size # https://nextjs.org/docs/advanced-features/output-file-tracing COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./