Docker Multistage Build - Continuous Delivery and Continuous Integration
Channel:
Subscribers:
11,000
Published on ● Video Link: https://www.youtube.com/watch?v=wjRdq0IbWvA
Use the Docker Multistage Build feature to first build a .jar-file and then add it to a much lighter application image.
The builder image contains all the required JDK's and SDK's and the source code.
The application image only contains the resulting Spring Boot .jar-file
This can be done with 1 Dockerfile!!!
Your CI system is going to love you because it only needs to run the Dockerfile and will not be polluted with jdk's and sdk's!
Enjoy! :-)
Feel free to write a comment or question.
The code is located here:
https://github.com/ekim197711/docker-multistage-build
Follow me on twitter:
https://twitter.com/MikeMoelNielsen
Other Videos By Mike Møller Nielsen
Tags:
java
docker
dockerfile
multistage
build
gradle
pipeline
spring
springboot
springframework