Skip to content

Commit

Permalink
[test] docker image 경량화
Browse files Browse the repository at this point in the history
  • Loading branch information
edder773 committed Nov 25, 2024
1 parent 56b7afe commit e833ce6
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ WORKDIR /app

# 공통 package.json과 lock 파일을 복사 및 설치
COPY package*.json pnpm-lock.yaml ./
RUN pnpm install --frozen-lockfile --prod # --prod로 프로덕션 의존성만 설치
RUN pnpm install --no-dev

# 프론트엔드 파일 복사 및 빌드
WORKDIR /app/apps/frontend
Expand All @@ -34,9 +34,6 @@ COPY --from=builder /app/apps/backend/dist /app/apps/backend/dist
COPY --from=builder /app/package.json /app/package.json
COPY --from=builder /app/pnpm-lock.yaml /app/pnpm-lock.yaml

# 불필요한 의존성 및 파일 복사하지 않기 (예: node_modules)
# 실행 환경에서 pnpm을 전역 설치하지 않음

# 프론트엔드와 백엔드 포트 노출 설정
EXPOSE 3000 8080

Expand Down

0 comments on commit e833ce6

Please sign in to comment.