You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed.
7
9
RUN apk add --no-cache libc6-compat
8
10
WORKDIR /app
9
11
COPY package.json ./
10
12
RUN yarn install --frozen-lockfile
11
13
12
-
# Rebuild the source code only when needed
13
-
FROMnode:18-alpine3.18 AS builder
14
+
#2. Rebuild the source code only when needed
15
+
FROMbase AS builder
14
16
ARG NOTION_PAGE_ID
17
+
ENV NEXT_BUILD_STANDALONE=true
18
+
15
19
WORKDIR /app
20
+
16
21
COPY --from=deps /app/node_modules ./node_modules
17
22
COPY . .
18
23
RUN yarn build
19
24
20
-
ENV NODE_ENV production
25
+
# 3. Production image, copy all the files and run next
26
+
FROM base AS runner
27
+
ENV NODE_ENV=production
28
+
29
+
WORKDIR /app
30
+
31
+
COPY --from=builder /app/public ./public
32
+
33
+
# Automatically leverage output traces to reduce image size
0 commit comments