Skip to content

Commit 8ae6f1b

Browse files
committed
build(docker): ensure public dir exists before copying in build stage
Creates the public directory to prevent COPY failures when no public assets are present in the app.
1 parent 1d3aab5 commit 8ae6f1b

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ WORKDIR /app
2424
COPY --from=deps /app/node_modules ./node_modules
2525
COPY . .
2626

27+
# Ensure the public directory exists so the later COPY does not fail when the app has no public assets yet
28+
RUN mkdir -p public
29+
2730
# Next.js collects completely anonymous telemetry data about general usage.
2831
# Learn more here: https://nextjs.org/telemetry
2932
# Uncomment the following line in case you want to disable telemetry during the build.

0 commit comments

Comments
 (0)