├── Dockerfile ├── README.md └── sample.war /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM tomcat:8.0-alpine 2 | LABEL maintainer="deepak@softwareyoga.com" 3 | 4 | ADD sample.war /usr/local/tomcat/webapps/ 5 | 6 | EXPOSE 8080 7 | CMD ["catalina.sh", "run"] -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # docker-tomcat-tutorial 2 | A basic tutorial on running a web app on Tomcat using Docker 3 | 4 | See tutorial here - https://www.softwareyoga.com/docker-tomact-tutorial/ 5 | 6 | # Steps 7 | * Install [Docker](https://docs.docker.com/install/). 8 | * Clone this repository - $git clone https://github.com/softwareyoga/docker-tomcat-tutorial.git 9 | * cd 'docker-tomcat-tutorial' 10 | * $docker build -t mywebapp . 11 | * $docker run -p 80:8080 mywebapp 12 | * http://localhost:80 13 | 14 | # Links 15 | [Sample Tomcat web app](https://tomcat.apache.org/tomcat-8.0-doc/appdev/sample/) 16 | -------------------------------------------------------------------------------- /sample.war: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/softwareyoga/docker-tomcat-tutorial/8a2fde395f72e1a3aecdb947d8a7bfa8eff98b93/sample.war --------------------------------------------------------------------------------