From 27318fc4b75d12be1935135b8db54279d0ac01bb Mon Sep 17 00:00:00 2001 From: 9yujin <9yujin@toss.im> Date: Sat, 3 Feb 2024 23:39:25 +0900 Subject: [PATCH] =?UTF-8?q?feat=20:=20yarn=20corepack=20=EB=8F=84=EC=9E=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile.ticket | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/Dockerfile.ticket b/Dockerfile.ticket index 2e600f38..b0d58687 100644 --- a/Dockerfile.ticket +++ b/Dockerfile.ticket @@ -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 yarn@3.3.0 --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"] \ No newline at end of file