Skip to content

Commit

Permalink
Merge pull request #43 from BaeJunH0/feat/#37-cicd
Browse files Browse the repository at this point in the history
fix : 내부 디렉토리 인식을 못하는 문제 해결
  • Loading branch information
BaeJunH0 authored Nov 29, 2024
2 parents 32908eb + 6daa14f commit f7be1b6
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,21 @@ on:
branches:
- main # main 브랜치에 push될 때 실행

permissions:
contents: read

jobs:
build-and-deploy:
runs-on: ubuntu-latest

steps:
# 1. 저장소 클론
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'

- name: Checkout repository
uses: actions/checkout@v3

Expand Down
15 changes: 5 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
# 베이스 이미지
FROM amazoncorretto:17

# 인자 설정 - Jar_File
# FROM openjdk:17-jdk
ARG JAR_FILE=build/libs/*.jar

# jar 파일 복제
COPY ${JAR_FILE} app.jar

# 인자 설정 부분과 jar 파일 복제 부분 합쳐서 진행해도 무방
#COPY build/libs/*.jar app.jar
COPY ${JAR_FILE} my-project.jar
# COPY build/libs/*.jar my-project.jar
ENTRYPOINT ["java","-jar","/my-project.jar"]

# 실행 명령어
ENTRYPOINT ["java", "-jar", "app.jar"]
RUN ln -snf /usr/share/zoneinfo/Asia/Seoul /etc/localtime

0 comments on commit f7be1b6

Please sign in to comment.