From d29666023e37db38d93ea59abf93b5a379e309df Mon Sep 17 00:00:00 2001 From: Liam <67254223+RealFascinated@users.noreply.github.com> Date: Sat, 29 Oct 2022 16:03:14 +0100 Subject: [PATCH] Update Dockerfile --- Dockerfile | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index a13b87a..ee57f17 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,6 +24,9 @@ COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* ./ # Uncomment the following line in case you want to disable telemetry during the build. ENV NEXT_TELEMETRY_DISABLED 1 +# Copy cached files +COPY node_modules ./ + RUN npm i # Build the project @@ -49,10 +52,6 @@ COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./ COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static COPY --from=builder --chown=nextjs:nodejs /app/public ./.next/static -# Copy cached files -COPY node_modules ./ - - RUN chown -R nextjs:nodejs /app USER nextjs