optimize Dockerfile
This commit is contained in:
+1
-3
@@ -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
|
||||
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
import type { NextConfig } from "next";
|
||||
|
||||
const nextConfig: NextConfig = {
|
||||
/* config options here */
|
||||
output: "standalone"
|
||||
};
|
||||
|
||||
export default nextConfig;
|
||||
|
||||
Reference in New Issue
Block a user