테스트로 제작해 본 BLOG Project Container에 등록
FROM openjdk:17-jdk-slim-buster AS builder
COPY ./blog/gradlew .
COPY ./blog/gradle gradle
COPY ./blog/build.gradle .
COPY ./blog/settings.gradle .
COPY ./blog/src src
RUN chmod +x ./gradlew
RUN ./gradlew bootJar
FROM openjdk
COPY --from=builder build/libs/*.jar app.jar
EXPOSE 9090
ENTRYPOINT ["java", "-jar", "/app.jar"]
$ docker stop 컨테이너명
$ docker rm 컨테이너명
$ docker run ~
docker ps -a