Skip to content

Commit

Permalink
infra : dockerfile 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
moonn6pence committed Oct 16, 2023
1 parent 46ba046 commit 3b99063
Showing 1 changed file with 13 additions and 15 deletions.
28 changes: 13 additions & 15 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
FROM adoptopenjdk:11 AS builder
COPY gradlew .
COPY settings.gradle .
COPY build.gradle .
COPY gradle gradle
COPY src src
RUN chmod +x ./gradlew
RUN ./gradlew build -x test

FROM adoptopenjdk:11
RUN mkdir /opt/app
COPY --from=builder build/libs/*.jar /opt/app/spring-boot-application.jar
EXPOSE 8080
ENV PROFILE local
ENTRYPOINT ["java", "-jar", "-Dspring.profiles.active=${PROFILE}" ,"/opt/app/spring-boot-application.jar"]
FROM openjdk:11-jdk

VOLUME /tmp

ARG JAR_FILE=./build/libs/ssafsound-1.0.jar

COPY ${JAR_FILE} app.jar

# file: 는 있어도 없어도 된다.
ENTRYPOINT ["nohup","java","-jar","app.jar","2>&1","&"]


#ENTRYPOINT ["java","-jar","app.jar","--spring.config.location=/config/application.yml"]

0 comments on commit 3b99063

Please sign in to comment.