diff --git a/Dockerfile b/Dockerfile index e1a1c91..e5e30a8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,8 @@ ENV NEXT_PUBLIC_APP_VERSION=$APP_VERSION WORKDIR /app -RUN corepack enable && corepack prepare yarn@4.9.1 --activate +RUN corepack enable +RUN corepack prepare yarn@4.12.0 --activate COPY package.json yarn.lock .yarnrc.yml ./ RUN yarn install --immutable @@ -22,9 +23,10 @@ LABEL org.opencontainers.image.version=$APP_VERSION WORKDIR /app -RUN corepack enable && corepack prepare yarn@4.9.1 --activate \ - && addgroup -S nodejs -g 1001 \ - && adduser -S nextjs -u 1001 +RUN corepack enable +RUN corepack prepare yarn@4.12.0 --activate +RUN addgroup -S nodejs -g 1001 +RUN adduser -S nextjs -u 1001 COPY --from=builder /app/yarn.lock ./yarn.lock COPY --from=builder /app/.yarnrc.yml ./.yarnrc.yml @@ -33,8 +35,8 @@ COPY --from=builder /app/public ./public COPY --from=builder /app/node_modules ./node_modules COPY --from=builder /app/package.json ./package.json -RUN mkdir -p /app/.yarn && chown -R nextjs:nodejs /app/.yarn -RUN mkdir -p /app/.next/cache/images && chown -R nextjs:nodejs /app/.next/cache/images +RUN mkdir -p /app/.yarn /app/.next/cache/images +RUN chown -R nextjs:nodejs /app USER nextjs EXPOSE 3000