content: FROM node:18-alpine AS builder
  
  WORKDIR /app
  
  ARG NEXT_PUBLIC_API_BASE_URL
  ARG NEXT_PUBLIC_CHANNEL_IO_KEY
  ARG NEXT_PUBLIC_IMAGE_URL
  ARG NEXT_PUBLIC_STAGE
  ARG NEXT_PUBLIC_SHOW_LOGIN_MODAL_FF
  ARG NEXT_PUBLIC_NEIS_API_KEY
  ARG NEXT_PUBLIC_NOTION_FAQ_DATABASE_ID
  ARG NEXT_PUBLIC_NOTION_MEMBER_DATABASE_ID
  ARG NEXT_PUBLIC_NOTION_SECRET_API_KEY
  ARG NEXT_PUBLIC_GOOGLE_CLIENT_ID
  ARG NEXT_PUBLIC_KAKAO_REST_API_KEY
  ARG NEXT_PUBLIC_CDN_URL
  ARG NEXT_PUBLIC_MOCK_SCORE_URL
  ARG NEXT_PUBLIC_MOCK_SCORE_API_KEY
  ARG NEXT_PUBLIC_GOOGLE_ANALYTICS
  
  ENV NEXT_PUBLIC_API_BASE_URL=$NEXT_PUBLIC_API_BASE_URL
  ENV NEXT_PUBLIC_CHANNEL_IO_KEY=$NEXT_PUBLIC_CHANNEL_IO_KEY
  ENV NEXT_PUBLIC_IMAGE_URL=$NEXT_PUBLIC_IMAGE_URL
  ENV NEXT_PUBLIC_STAGE=$NEXT_PUBLIC_STAGE
  ENV NEXT_PUBLIC_SHOW_LOGIN_MODAL_FF=$NEXT_PUBLIC_SHOW_LOGIN_MODAL_FF
  ENV NEXT_PUBLIC_NEIS_API_KEY=$NEXT_PUBLIC_NEIS_API_KEY
  ENV NEXT_PUBLIC_NOTION_FAQ_DATABASE_ID=$NEXT_PUBLIC_NOTION_FAQ_DATABASE_ID
  ENV NEXT_PUBLIC_NOTION_MEMBER_DATABASE_ID=$NEXT_PUBLIC_NOTION_MEMBER_DATABASE_ID
  ENV NEXT_PUBLIC_NOTION_SECRET_API_KEY=$NEXT_PUBLIC_NOTION_SECRET_API_KEY
  ENV NEXT_PUBLIC_GOOGLE_CLIENT_ID=$NEXT_PUBLIC_GOOGLE_CLIENT_ID
  ENV NEXT_PUBLIC_KAKAO_REST_API_KEY=$NEXT_PUBLIC_KAKAO_REST_API_KEY
  ENV NEXT_PUBLIC_CDN_URL=$NEXT_PUBLIC_CDN_URL
  ENV NEXT_PUBLIC_MOCK_SCORE_URL=$NEXT_PUBLIC_MOCK_SCORE_URL
  ENV NEXT_PUBLIC_MOCK_SCORE_API_KEY=$NEXT_PUBLIC_MOCK_SCORE_API_KEY
  ENV NEXT_PUBLIC_GOOGLE_ANALYTICS=$NEXT_PUBLIC_GOOGLE_ANALYTICS
  
  COPY . .
  
  RUN corepack enable && corepack prepare pnpm@latest --activate
  
  RUN pnpm install --frozen-lockfile
  RUN pnpm client build
  
  FROM node:18-alpine AS runner
  
  WORKDIR /app
  
  COPY --from=builder /app/apps/client/.next/standalone ./
  COPY --from=builder /app/apps/client/.next/static ./apps/client/.next/static
  COPY --from=builder /app/apps/client/public ./apps/client/public
  
  CMD ["node", "apps/client/server.js"]
  