Can i be able to have two web apps in a tomcat by using docker

I have used docker but don’t no how to have two web apps by using tomcat. So kindly tell me is there a possible way to do ? and if there is a possibility can u give me suggestion how to use the web apps in tomcat

I don’t do Java development, so I haven’t tried this, but from the ‘using tomcat in Docker containers’, it sounds to me like you can place many war files into the /var/lib/tomcat7/webapps dir, and it’ll work.

I’d probably make a Dockerfile that starts with FROM tomcat, and then have it add the war files - and then run that new image, but you could also use volumes to add them.

mmm, though it seems to me that the official image ( ) might have a different directory layout - i think that means you put the war files into the $CATALINA_HOME/webapps dir.

That’s right. There is no docker limitations. Just put your WAR into the <catalina_base>/webapps directory.
If you have the host-manager installed and forwarded your tomcat port to your host you can also do it within your browser. Just open http://:8080/manager/html . You’ll see the list of deployed apps.

Can you help me with a sample war file for tomcat ?