Spring Boot + Docker Multistage = Smaller container size
Use can use prebuild version by using:
$ docker run -d -p 8080:8080 saboteurkid/smaller-spring:1.0
Wait for docker to pull and up. Then jump to step #6
$ git clone https://github.com/spring-guides/gs-spring-boot.git
$ cd gs-spring-boot/complete
wget https://gist.githubusercontent.com/krishofmans/6c7b2ad75ce9250a7603da921a85598e/raw/11094575ec75f7e5f60bbb12c1075999f36ff73a/Dockerfile
$ docker build -t saboteurkid/smaller-spring:1.0 .
$ docker images
You will see something like this:
saboteurkid/smaller-spring 1.0 f880454cde3e 23 minutes ago 99.4MB
$ docker run -d -p 8080:8080 saboteurkid/smaller-spring:1.0
$ curl localhost:8080
You will received: Greetings from Spring Boot!