$ cd product-service
$ mvn
$ <sudo> docker build -t product-service .
$<sudo> docker run product-service -d -p 9090:8181
FROM openjdk:11-jre-slim
WORKDIR .
ADD /target/product-service-0.0.1-SNAPSHOT.jar product-service.jar
EXPOSE 8181
ENTRYPOINT ["java","-jar","product-service.jar"]
Issue spring and java 11:
- as jdk.java.net saying: "no longer recommended for use in production", so we should have a plan to use other version
- we have a small problem with image size of 11, we are working around any solution to increase size of the image