-
Notifications
You must be signed in to change notification settings - Fork 0
과제 2-7 pgsshiho 과제제출 #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
snowykte0426
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
아직 완성되지 않은거 같은데 참고하여주세요
| ## 🐋 Dockerfile 내용 | ||
| ```dockerfile | ||
| # 해당 주석을 지우고 Dockerfile 내용을 입력해주세요. | ||
| ``` | ||
| FROM gradle:8-jdk-alpine AS builder | ||
| WORKDIR /app | ||
| COPY --chown=gradle:gradle . . | ||
| RUN gradle build --no-daemon | ||
| FROM openjdk:17-jdk-slim | ||
| WORKDIR /app | ||
| COPY --from=builder /app/build/libs/*.jar app.jar | ||
| CMD ["java", "-jar", "app.jar"] | ||
|
|
||
| ``` | ||
|  | ||
|  | ||
|  | ||
|  | ||
| ## 📷 API 요청 결과 스크린샷 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| FROM gradle:8-jdk-alpine AS builder | ||
| WORKDIR /app | ||
| COPY --chown=gradle:gradle . . | ||
| RUN gradle build --no-daemon | ||
| FROM openjdk:17-jdk-slim | ||
| WORKDIR /app | ||
| COPY --from=builder /app/build/libs/*.jar app.jar | ||
| CMD ["java", "-jar", "app.jar"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ENV 명령어가 마지막 CMD 명령어 이전에 무조건 포함되어야 합니다!
첫번째 FROM에서 AS를 사용한 만큼 이후 FROM에서도 AS를 사용하는게 어떤가요?
그리고 예칭이 사용되지 않은거 같은데 무엇보다 AS를 사용한 이유가 궁금합니다

🐋 Dockerfile 내용
# 해당 주석을 지우고 Dockerfile 내용을 입력해주세요.📷 API 요청 결과 스크린샷