diff --git a/Dockerfile b/Dockerfile index 54d492e..60064e4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,8 +10,6 @@ COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* ./ # Copy cached files COPY node_modules ./ -RUN npm i - # RUN \ # if [ -f yarn.lock ]; then yarn --frozen-lockfile; \ # elif [ -f package-lock.json ]; then npm ci; \ @@ -53,6 +51,8 @@ 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 +RUN npm i + RUN chown -R nextjs:nodejs /app USER nextjs