A Sample Application based on Spring Boot which uses Docker plugin to build the image of the application. This document lists out the steps to build, push the image and use it to launch the server inside the container.
create account at https://hub.docker.com
docker login
mvn clean install
mvn install -DskipTests dockerfile:build
docker images
mvn install -DskipTests dockerfile:push
image pushed at https://hub.docker.com/r/pravsingh/springboot-dockerized/
docker rmi pravsingh/springboot-dockerized
docker pull pravsingh/springboot-dockerized
docker run -p 8080:8080 -t pravsingh/springboot-dockerized
docker run -e "SPRING_PROFILES_ACTIVE=dev" -p 8080:8080 -t pravsingh/springboot-dockerized
mvn spring-boot:run
./start.sh