Skip to content

Commit

Permalink
[Feat]: 도커파일 layeredjar 적용
Browse files Browse the repository at this point in the history
  • Loading branch information
bayy1216 committed Jul 2, 2024
1 parent 0cf89f7 commit 07674a9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,12 @@ jobs:
java-version: '17'
distribution: 'adopt'

- name: Setup Gradle # Gradle을 설정합니다.
- name: Setup Gradle And Build # Gradle을 설정하고 빌드합니다.
run: |
chmod +x ./gradlew
./gradlew clean build
java -Djarmode=layertools -jar zzansuni-api-server/app/build/libs/app-0.0.1-SNAPSHOT.jar extract
- name: Set up Docker Buildx # Docker Buildx를 설정합니다.
uses: docker/setup-buildx-action@v3
Expand Down
8 changes: 5 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
FROM openjdk:17-alpine
WORKDIR /usr/src/app
ARG JAR_FILE=zzansuni-api-server/app/build/libs/*.jar
COPY ${JAR_FILE} app.jar
ENTRYPOINT ["java", "-Duser.timezone=Asia/Seoul", "-jar", "app.jar"]
COPY ./dependencies ./
COPY ./spring-boot-loader ./
COPY ./snapshot-dependencies ./
COPY ./application ./
ENTRYPOINT ["java", "-Duser.timezone=Asia/Seoul", "org.springframework.boot.loader.JarLauncher"]

0 comments on commit 07674a9

Please sign in to comment.