From cdb75aae87ef9698c7664ca33da9cb18f2ab931d Mon Sep 17 00:00:00 2001 From: Liam Date: Fri, 19 Apr 2024 17:01:18 +0100 Subject: [PATCH] fix the Dockerfile - copy public dir --- Dockerfile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index a0235c8..2b80d16 100644 --- a/Dockerfile +++ b/Dockerfile @@ -25,7 +25,7 @@ COPY . . # Next.js collects completely anonymous telemetry data about general usage. # Learn more here: https://nextjs.org/telemetry # Uncomment the following line in case you want to disable telemetry during the build. -# ENV NEXT_TELEMETRY_DISABLED 1 +ENV NEXT_TELEMETRY_DISABLED 1 RUN \ if [ -f yarn.lock ]; then yarn run build; \ @@ -40,11 +40,14 @@ WORKDIR /app ENV NODE_ENV production # Uncomment the following line in case you want to disable telemetry during runtime. -# ENV NEXT_TELEMETRY_DISABLED 1 +ENV NEXT_TELEMETRY_DISABLED 1 RUN addgroup --system --gid 1001 nodejs RUN adduser --system --uid 1001 nextjs +# Copy the public folder +COPY --from=builder /app/public ./public + # Set the correct permission for prerender cache RUN mkdir .next RUN chown nextjs:nodejs .next @@ -54,9 +57,6 @@ RUN chown nextjs:nodejs .next COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./ COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static -# Copy the public folder -COPY --chown=nextjs:nodejs /app/public ./public - USER nextjs ENV HOSTNAME "0.0.0.0"