Skip to content
Navigation Menu
Sign in
Products
Platform
GitHub
Repository hosting, code review, and collaboration
Copilot
AI coding agent for tasks, projects and automated work
Build & Ship
Actions
CI/CD and automation
Code Quality
Quality analysis, fixes, and enforcement
Codespaces
Cloud development environments
Secure
Code Security
Vulnerability detection and remediation
Secret Protection
Secret scanning and leak prevention
All Features
Developers
Learn
Documentation
Training
Certifications
Build
Build with Copilot
Customize Copilot
Integrations
Explore
Trending repos
GitHub Sponsors
Events
Changelog
Changelog
Your source for the latest features, improvements, and fixes across GitHub products, all in one place.
Businesses
By Stage
Enterprises
Team
Startups
Nonprofits
By Industry
Healthcare
Financial services
Manufacturing
Government
See all industries
Evaluate GitHub
Why GitHub
Customer Stories
Business insights
Trust Center
Add-ons
GitHub Advanced Security
Enterprise-grade code security
Copilot for business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Resources
Learn & Connect
Documentation
Resource center
Blog
Events & webinars
Community Forum
Customer Stories
Integrations
Support
Customer support
Training
GitHub Status
Company
About
Partners
Changelog
GitHub Universe
GitHub Universe
The event for developers, by developers — talks, workshops, and what’s next for GitHub.
Pricing
Search
/
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
CSE-Shaco
24-2_GDGoC_Web
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
More
items
Files
Expand file tree
develop
Breadcrumbs
24-2_GDGoC_Web
/
Dockerfile
Copy path
Blame
More file actions
Blame
More file actions
Latest commit
History
History
History
54 lines (39 loc) · 1.22 KB
develop
Breadcrumbs
24-2_GDGoC_Web
/
Dockerfile
Copy path
Top
File metadata and controls
Code
Blame
54 lines (39 loc) · 1.22 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# 1단계: 빌드 환경
FROM node:22 AS builder
WORKDIR /app
# package.json과 package-lock.json을 먼저 복사하고, npm install 실행
COPY package.json package-lock.json ./
RUN npm install
# .env 파일을 먼저 복사
COPY .env ./
# 이후 전체 파일 복사
COPY . .
# next.config.ts 확인
RUN cat next.config.ts
# 빌드 실행 (output: export가 있는지 확인)
# 명시적으로 next build 명령 사용
RUN npx next build
# 빌드 결과 확인
RUN ls -la /app
RUN ls -la /app/.next || echo ".next 디렉토리가 없습니다"
RUN ls -la /app/out || echo "out 디렉토리가 없습니다"
# 2단계: 실행 환경
FROM node:22
WORKDIR /app
# 프로덕션 의존성만 가져오기
COPY package*.json ./
RUN npm install --omit=dev
# .env 파일 복사
COPY .env ./
# 빌드된 결과물 가져오기
COPY --from=builder /app/.next ./.next
COPY --from=builder /app/public ./public
COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/package.json ./package.json
COPY --from=builder /app/next.config.ts ./next.config.ts
# 실행환경 확인
RUN ls -la /app
RUN ls -la /app/.next || echo ".next 디렉토리가 없습니다"
EXPOSE 3000
# Next.js 서버 시작
CMD ["npm", "run", "start"]
You can’t perform that action at this time.