FROM node:16-alpine AS deps WORKDIR /app COPY package.json yarn.lock ./ RUN yarn install --frozen-lockfile FROM node:16-alpine AS builder WORKDIR /app COPY . . COPY --from=deps /app/node_modules ./node_modules ENV NEXT_TELEMETRY_DISABLED 1; ENV NODE_ENV production; RUN yarn export FROM nginx:alpine AS runner COPY --from=builder /app/out /usr/share/nginx/html EXPOSE 80