Skip to content
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

feat: 도커파일 추가 #445

Merged
merged 9 commits into from
Apr 23, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM openjdk:17-slim
Copy link
Member

Choose a reason for hiding this comment

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

slim으로 한 이유가 있나요?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

음... 이미지 크기 줄일려고 slim으로 설정

Copy link
Member

Choose a reason for hiding this comment

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

저는 갠적으로 amazoncorretto:17 좋아해요
aws 꺼라서 호환이슈에서 조금 안정적인 느낌

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

네 반영하겠습니다~

WORKDIR /app
VOLUME /tmp
Copy link
Member

Choose a reason for hiding this comment

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

R

/tmp 경로 말고 적절한 위치 없을까요?

linux의 /tmp 경로는 말 그대로 임시파일이 위치하는 경로입니다.
없어져도 무관한 경로라서 가끔 몇몇 OS에서는 system cron으로 30일 뒤에 공간을 비운다는 등의 작업을 수행한다고도 하네요

/usr/local 어딘가에 좋은 위치는 없을까요?

참고자료: https://coding-panda.com/%EB%A6%AC%EB%88%85%EC%8A%A4-%EC%A3%BC%EC%9A%94-%EB%94%94%EB%A0%89%ED%86%A0%EB%A6%AC-%EB%B3%84-%EC%97%AD%ED%95%A0-%EB%B0%8F-%EC%84%A4%EB%AA%85/#tmp

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

음 이미지는 빌드후 삭제시켜도 무방한 이미지라 tmp에 넣어두었는데, 그렇다면
그냥 생략해도 무방할것 같습니다.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

그리고 tmp라고 저장할경우 실제 저장되는 위치는 var/lib/jenkins/workspace에서의 tmp가 위치입니다.
image

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

즉 따로 동기화할만한 데이터가 없으면 없애도 무방하다는 입장입니다

ADD /var/lib/jenkins/workspace/KOIN_API_V2_STAGE/build/libs/KOIN_API_V2.jar /app/app.jar
ENV JAVA_OPTS=""
Copy link
Member

Choose a reason for hiding this comment

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

이 ENV는 왜 넣었나요

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

아 env는 혹시나 추후 디버깅할때 쓸까봐 넣었어요

ENTRYPOINT ["java", "-jar", "/app/app.jar"]
Loading