Skip to content

Commit

Permalink
feat : yarn corepack 도입
Browse files Browse the repository at this point in the history
  • Loading branch information
9yujin committed Feb 3, 2024
1 parent 25cd793 commit 27318fc
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions Dockerfile.ticket
Original file line number Diff line number Diff line change
@@ -1,30 +1,26 @@
FROM node:16-alpine AS builder

# 작업 디렉토리 설정
WORKDIR /app

# package.json 및 yarn.lock 파일 복사
COPY package.json ./
COPY yarn.lock ./

# Yarn을 최신 버전으로 업그레이드
RUN npm install [email protected] --global --force
# Yarn 설치 스크립트를 사용하여 Yarn 설치
RUN npm install -g corepack
RUN corepack enable
RUN yarn set version berry
RUN yarn set version 3.3.0

# 의존성 설치
RUN yarn install --immutable --immutable-cache --check-cache

# 애플리케이션 소스 복사
COPY . ./

# 필요없는 디렉토리 제거
RUN rm -rf apps/admin

# 앱 빌드
RUN yarn ticket:build

# 캐시 제거
RUN rm -rf apps/ticket/.next/cache

EXPOSE 3000

CMD ["yarn", "ticket:start"]
CMD ["yarn", "ticket:start"]

0 comments on commit 27318fc

Please sign in to comment.