-
Spring boot app - fat jar (https://github.com/Wolodja/springbootwebapp)
-
Dockerfile
-
Create software folder with name "tmp"
-
Copy "spring-boot-web-0.0.1-SNAPSHOT.jar" from the target folder of the project to the tmp folder
-
In this folder copy "Dockerfile"
-
Use BASH to navigate to the folder "tmp"
-
Run "docker build -t spring-boot-docker ."
-
After the run check if there are no errors
-
Go to docker terminal and run: docker run -d -p 8081:8081 spring-boot-docker
-
Run "docker ps" if all is ok you should see:
IMAGE PORTS
spring-boot-docker 0.0.0.0:8081->8081/tcp
-
Run "docker-machine.exe ip" and copy the IP
-
Open the browser
-
Go to the URL bar and navigate to "http://IP_OF_THE_CNTAINER:8081/"
Example (http://192.168.99.101:8081/)