Hello World sample shows how to deploy SpringBoot RESTful web service application with Docker
Installed: Docker, Java 1.8, Maven 3.x
$ git clone https://github.com/dstar55/docker-hello-world-spring-boot .
$ mvn clean install
$ mv ./target/hello*.jar ./data
$ docker build -t="hello-world-java" .
Note:if you run this command for first time it will take some time in order to download base image from DockerHub
$ docker run -p 8080:8080 -it --rm hello-world-java
first you need to find ContainerId of the running Docker image
$ docker ps
you can find ContainerId in a row where IMAGE column contains 'hello-world-java' phrase
then you need to find IP address of the running Docker image
$ docker inspect --format '{{ .NetworkSettings.IPAddress }}' [ContainerId]
now test application
$ curl [IPAddress]:8080
the respone should be
Hello World