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

[CI,BUG] πŸ› Fix : docker μ„€μ • μΆ”κ°€ #9

Merged
merged 1 commit into from
Apr 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
18 changes: 18 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# κΈ°λ³Έ 이미지 μ„€μ •
FROM eclipse-temurin:17-jdk

# ν˜„μž¬ 리포지토리, api gateway의 μ½”λ“œλ₯Ό λ°”νƒ•μœΌλ‘œ JAR 생성
ARG JAR_FILE=build/libs/*.jar
COPY ${JAR_FILE} app.jar

# μ΅œμ’… 이미지 생성
FROM eclipse-temurin:17-jdk
COPY --from=0 app.jar app.jar

# μ• ν”Œλ¦¬μΌ€μ΄μ…˜ μ‹€ν–‰ 슀크립트 μΆ”κ°€
COPY dev_start.sh start.sh
RUN chmod +x start.sh

EXPOSE 8080

ENTRYPOINT ["./start.sh"]
12 changes: 12 additions & 0 deletions Dockerrun.aws.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"AWSEBDockerrunVersion": "1",
"Image": {
"Name": "851725177732.dkr.ecr.ap-northeast-2.amazonaws.com/tree-dev:latest",
"Update": "true"
},
"Ports": [
{
"ContainerPort": "8080"
}
]
}
7 changes: 7 additions & 0 deletions dev_start.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

# μ• ν”Œλ¦¬μΌ€μ΄μ…˜μ„ λ°±κ·ΈλΌμš΄λ“œμ—μ„œ μ‹€ν–‰
java -jar -Dspring.profiles.active=common,dev app.jar &

# λͺ¨λ“  μžμ‹ ν”„λ‘œμ„ΈμŠ€κ°€ μ’…λ£Œλ  λ•ŒκΉŒμ§€ λŒ€κΈ°
wait
Loading