PS: if you wanna access it from host ip or host's public ip you need to add host option just like below command, and while running since this is an designed as interactive java app, if you want it to run it in background, don't forget to add -d parameter.
docker pull tryingtobecoder/docker-hello-world:latest
docker run -d --network host tryingtobecoder/docker-hello-world:latest
Now go to, http://server_ip:8080
git clone https://github.com/devopsrange/spring-petclinic
cd spring-petclinic
docker build -t spring-petclinic-app .
Now we can tag and push our image to tryingtobecoder/docker-hello-world repository. You can change the repository parameters depending on yours.
docker tag spring-petclinic-app:latest tryingtobecoder/docker-hello-world:latest
docker push tryingtobecoder/docker-hello-world:latest