iop/apps/client/Dockerfile
toki 88a01ce014 fix(client): compose 웹 빌드 경로를 보강한다
ignored sibling lock file에 의존하던 Dockerfile cache layer를 제거한다.

원격 포트 표준화 검증 루프의 완료 archive와 후속 확인 plan을 정리한다.
2026-06-07 21:15:44 +09:00

37 lines
1.5 KiB
Docker

# syntax=docker/dockerfile:1
FROM ghcr.io/cirruslabs/flutter:stable AS builder
ARG IOP_CONTROL_PLANE_HTTP_URL=http://localhost:18000
ARG IOP_CONTROL_PLANE_WIRE_URL=ws://localhost:19080/client
WORKDIR /workspace/iop/apps/client
# docker-compose builds this Dockerfile with /config/workspace as context so the
# sibling path dependencies declared in pubspec.yaml resolve under /workspace.
# Copy manifests first so pub get can cache, then copy full sources before build.
COPY proto-socket/dart/pubspec.yaml /workspace/proto-socket/dart/
COPY agent-shell/pubspec.yaml /workspace/agent-shell/
COPY nexo/packages/messaging_flutter/pubspec.yaml /workspace/nexo/packages/messaging_flutter/
COPY iop/packages/flutter/iop_console/pubspec.yaml /workspace/iop/packages/flutter/iop_console/
COPY iop/apps/client/pubspec.yaml iop/apps/client/pubspec.lock ./
RUN flutter pub get
COPY proto-socket/dart/ /workspace/proto-socket/dart/
COPY agent-shell/ /workspace/agent-shell/
COPY nexo/packages/messaging_flutter/ /workspace/nexo/packages/messaging_flutter/
COPY iop/packages/flutter/iop_console/ /workspace/iop/packages/flutter/iop_console/
COPY iop/apps/client/ ./
RUN flutter build web \
--release \
--dart-define=IOP_CONTROL_PLANE_HTTP_URL=$IOP_CONTROL_PLANE_HTTP_URL \
--dart-define=IOP_CONTROL_PLANE_WIRE_URL=$IOP_CONTROL_PLANE_WIRE_URL
FROM nginx:1.27-alpine AS runner
COPY --from=builder /workspace/iop/apps/client/build/web /usr/share/nginx/html
COPY iop/apps/client/nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 3000
CMD ["nginx", "-g", "daemon off;"]