Skip to content

Conversation

@pgsshiho
Copy link

🐋 Dockerfile 내용

# 해당 주석을 지우고 Dockerfile 내용을 입력해주세요.

📷 API 요청 결과 스크린샷

API 요청 결과의 스크린샷들을 첨부하여주세요.

@snowykte0426 snowykte0426 changed the title 2-7 complete 과제 2-7 pgsshiho 과제제출 Mar 20, 2025
Copy link
Member

@snowykte0426 snowykte0426 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

아직 완성되지 않은거 같은데 참고하여주세요

Comment on lines 1 to 17
## 🐋 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"]

```![ㅁㄴㅇㅁㄴㅇ.png](..%2Fscreenshot%2F%E3%85%81%E3%84%B4%E3%85%87%E3%85%81%E3%84%B4%E3%85%87.png)
![화면 캡처 2025-03-20 172924.png](..%2Fscreenshot%2F%ED%99%94%EB%A9%B4%20%EC%BA%A1%EC%B2%98%202025-03-20%20172924.png)
![화면 캡처 2025-03-20 173337.png](..%2Fscreenshot%2F%ED%99%94%EB%A9%B4%20%EC%BA%A1%EC%B2%98%202025-03-20%20173337.png)
![화면 캡처 2025-03-20 174529.png](..%2Fscreenshot%2F%ED%99%94%EB%A9%B4%20%EC%BA%A1%EC%B2%98%202025-03-20%20174529.png)
![화면 캡처 2025-03-20 174705.png](..%2Fscreenshot%2F%ED%99%94%EB%A9%B4%20%EC%BA%A1%EC%B2%98%202025-03-20%20174705.png)
## 📷 API 요청 결과 스크린샷
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PULL_REQEUST_TEMPLATE.md 파일은 미리 PR의 본문 형식을 지정하는 파일입니다

해당 파일이 아니라
image
위와 같이 PR을 생성할 때 본문 칸에 내용을 채워주세요

Comment on lines +1 to +8
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"]
Copy link
Member

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를 사용한 이유가 궁금합니다

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants