- Next.js 애플리케이션 개발을 위한 설정 구성을 위해 사용됨
- create-next-app 설치하기
- 포커싱된 경로의 my-app 에 생성된다.
- Next.js 프로젝트가 잘 작동하는지 확인하기
- npm run dev 실행하기
- localhost:3000 입력하기
- npm run dev 실행하기
- 이미지 생성하기
- Dockerfile 파일 생성하기
FROM node:20-alpine WORKDIR /app RUN npm install RUN npm run build EXPOSE 3000 ENTRYPOINT [ "npm", "run", "start"]
- Dockerignore 파일 생성하기
node_modules
- Dockerfile 파일 생성하기
- 이미지 빌드하기
- docker build -t next-server .
- docker build -t next-server .
- asdf
- 매니페스트 파일 생성
apiVersion: v1 kind: Pod metadata: name: next-pod spec: containers: - name: next-container image: next-server imagePullPolicy: IfNotPresent ports: - containerPort: 3000
- Pod 생성하기
- 포트포워딩 후 접속하기
- 매니페스트 파일 생성
- create-next-app 설치하기
'쿠버네티스 > cka' 카테고리의 다른 글
파드(Pod) 디버깅하는 방법 (0) | 2025.02.27 |
---|---|
백엔드 (Spring Boot) 서버를 3개 띄워보기 (0) | 2025.02.26 |
프론트엔드(HTML, CSS, Nginx) 서버를 Pod로 띄워보기 (0) | 2025.02.25 |
백엔드 Nest.js 서버를 Pod 로 띄워보기 (0) | 2025.02.24 |
Windows VS code 환경에서 백엔드(Spring Boot) 서버를 파드(Pod)로 띄워보기 (0) | 2025.02.19 |