We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8a8ef7d commit 6ac0043Copy full SHA for 6ac0043
Dockerfile
@@ -19,16 +19,15 @@ FROM node:25-alpine AS builder
19
WORKDIR /app
20
COPY . .
21
22
-# Set NODE_ENV to production for build
23
-ENV NODE_ENV=production
24
-
25
# Accept build arguments for NEXT_PUBLIC environment variables
26
ARG NEXT_PUBLIC_APP_URL
27
ENV NEXT_PUBLIC_APP_URL=$NEXT_PUBLIC_APP_URL
28
+# Install all deps (including devDependencies needed for the build)
29
RUN yarn
30
31
-RUN yarn build
+# Set NODE_ENV to production only for the build step
+RUN NODE_ENV=production yarn build
32
33
# If using npm comment out above and use below instead
34
# RUN npm run build
0 commit comments