Skip to content

Commit

Permalink
[feat] 도커파일 및 테스트 파일 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
wndlthsk committed Oct 3, 2024
1 parent 46b1d89 commit 66394b2
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
17 changes: 17 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Dockerfile

# jdk17 Image Start
#FROM --platform=linux/amd64 ubuntu:latest
FROM openjdk:17

# 인자 설정 - Jar_File
ARG JAR_FILE=build/libs/*.jar

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

# 인자 설정 부분과 jar 파일 복제 부분 합쳐서 진행해도 무방
#COPY build/libs/*.jar app.jar

# 실행 명령어
ENTRYPOINT ["java", "-jar", "app.jar"]
13 changes: 13 additions & 0 deletions src/main/java/team7/inplace/cicd/TestController.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package team7.inplace.cicd;

import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class TestController {
@GetMapping("/cicd")
public ResponseEntity test() {
return ResponseEntity.ok("ci/cd 테스트");
}
}

0 comments on commit 66394b2

Please sign in to comment.