Dockerizing the application

Create a Dockerfile with the following contents to create a docker image of the spring boot application

FROM adoptopenjdk/openjdk11:alpine-jre

ARG artifact=target/spring-boot-web.jar

WORKDIR /opt/app

COPY ${artifact} app.jar

ENTRYPOINT ["java","-jar","app.jar"]

Last updated