This is the first sample of docker image created. Currently it includes following modules:
1) tomcat 9
2) springmvc/maven based simple "hello" web application.
How to use this docker image
1) pull the docker image using: "docker pull mohanht/sample_webapp"
2) run the docker image using: "docker run -p 8080:8080 mohanht/sample_webapp"
in case you want to map tomcat port 8080 to some different port on host, you can do that by modifying the port combination <port-of-host>:8080 instead of 8080:8080. for example: 80:8080.
3) Running the web application: open url in browser - "http://localhost:8080/MySampleWebapp" // if port mapped is 8080
If you see "hello" message on the browser, container is running fine.
4) To stop the container, use "ctrl+c"