Prototype Spring-Boot with Docker that we can simply create a small service running within springboot and build docker container in which it can run on any platforms
- Install Java6 up
- Install Maven
- Install Docker.
Package Spring-Boot as one fat jar file
mvn package
Build docker container given a container name boot-docker
docker build -t boot-docker .
Run Spring-Boot inside docker with Docker dockerfile/java
docker run -it --rm -p 8080:8080 boot-docker
Next we can put all above command and workflow inside Dockerfile and have only one Docker file to build and run.