Spring Boot Docker Multi Layer example
Make any changes into the Java code and execute the following commands
- "./mvnw clean package"
- Create the jar file
- "docker build -t popovskinikola/spring-boot-multi-layer:1 ."
- this command should be executed in the root of the folder of the project
- this will read the docker file and create an image
- also on this location we should have the docker file
- "docker run -p 8080:7070 popovskinikola/spring-boot-multi-layer:1"
- This will create container in our local docker
- http://localhost:8080/
- Result Hello Docker Fat Jar without Layers
- "docker push popovskinikola/spring-boot-multi-layer:1"
- push your the repo into docker