diff --git a/Dockerfile b/Dockerfile index 88e2dbe..910bf08 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,3 @@ -ARG GUI_VERSION=dev FROM node:18-alpine AS base # Install dependencies only when needed @@ -19,6 +18,7 @@ RUN \ # Rebuild the source code only when needed FROM base AS builder +ARG GUI_VERSION=dev WORKDIR /app COPY --from=deps /app/node_modules ./node_modules COPY . . @@ -26,7 +26,7 @@ COPY . . # Next.js collects completely anonymous telemetry data about general usage. # Learn more here: https://nextjs.org/telemetry # Uncomment the following line in case you want to disable telemetry during the build. -ENV NEXT_TELEMETRY_DISABLED 1 +ENV NEXT_TELEMETRY_DISABLED=1 RUN echo ${GUI_VERSION} > /app/gui-version.txt RUN npm run build @@ -35,9 +35,9 @@ RUN npm run build FROM base AS runner WORKDIR /app -ENV NODE_ENV production +ENV NODE_ENV=production # Uncomment the following line in case you want to disable telemetry during runtime. -ENV NEXT_TELEMETRY_DISABLED 1 +ENV NEXT_TELEMETRY_DISABLED=1 RUN addgroup --system --gid 1001 nodejs RUN adduser --system --uid 1001 nextjs @@ -49,11 +49,10 @@ COPY --from=builder /app/public ./public COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./ COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static COPY --from=builder /app/gui-version.txt ./ - USER nextjs EXPOSE 3000 -ENV PORT 3000 +ENV PORT=3000 CMD ["node", "server.js"] \ No newline at end of file