File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed
Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,8 @@ RUN npm install
1111COPY . .
1212RUN npm run build
1313
14- RUN ls -l /app
14+ # 빌드 결과물 확인
15+ RUN ls -la /app
1516
1617# 2단계: 실행 환경
1718FROM node:18
@@ -22,13 +23,18 @@ WORKDIR /app
2223COPY package*.json ./
2324RUN npm install --omit=dev
2425
25- # 빌드된 결과물 가져오기 (.next 포함!)
26- COPY --from=builder /app/.next ./.next
26+ # 빌드 결과물 위치 확인 후 복사 (.next 또는 out 디렉토리)
27+ COPY --from=builder /app/.next ./.next || true
28+ COPY --from=builder /app/out ./out || true
2729COPY --from=builder /app/public ./public
2830COPY --from=builder /app/node_modules ./node_modules
2931COPY --from=builder /app/package.json ./package.json
3032COPY --from=builder /app/next.config.mjs ./next.config.mjs
3133
34+ # 현재 디렉토리 확인
35+ RUN ls -la /app
36+
3237EXPOSE 3000
33- CMD ["npm" , "run" , "start" ]
3438
39+ # package.json에 명시된 start 스크립트 실행
40+ CMD ["npm" , "run" , "start" ]
You can’t perform that action at this time.
0 commit comments