Skip to content

ankur198/SpringBootWindowsDocker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Springboot container on windows

docker hub

Java CI with Maven

How to run

  1. start container docker run --rm -it -p 8080:8080 --name myapp ankur198/springboot-windows --name myapp java -jar ./opt/app/demo-0.0.1-SNAPSHOT.jar
  2. get ip docker inspect -f "{{ .NetworkSettings.Networks.nat.IPAddress }}" myapp
  3. open ip:8080/hello in your browser

short way

docker run -p 8080:8080 --name myapp ankur198/springboot-windows --name myapp java -jar ./opt/app/demo-0.0.1-SNAPSHOT.jar
$ip = docker inspect -f "{{ .NetworkSettings.Networks.nat.IPAddress }}" myapp
Start-Process 'http://$($ip):8080/hello

Why ip?

See this