From 823896bccb3013c70f5f4c1fe54a7bd04647233f Mon Sep 17 00:00:00 2001 From: Aaron Date: Thu, 19 Feb 2026 04:13:16 +0100 Subject: [PATCH] optimize Dockerfile --- Dockerfile | 4 +--- next.config.ts | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1e5fb00..7c0ef1b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,10 +24,8 @@ RUN addgroup -g 1001 nodejs \ && adduser -u 1001 -G nodejs -s /bin/sh -D nextjs # Copy only what is needed for runtime +COPY --from=builder /app/.next/standalone ./ COPY --from=builder /app/public ./public -COPY --from=builder /app/.next ./.next -COPY --from=builder /app/node_modules ./node_modules -COPY --from=builder /app/package.json ./package.json USER nextjs diff --git a/next.config.ts b/next.config.ts index e9ffa30..bff4933 100644 --- a/next.config.ts +++ b/next.config.ts @@ -1,7 +1,7 @@ import type { NextConfig } from "next"; const nextConfig: NextConfig = { - /* config options here */ + output: "standalone" }; export default nextConfig;