Azure

Default tomcat docker container is not working

You may encounter issues while checking your first tomcat docker container pulled from docker hub as below. I am find the issue for tomcat 9.0

I saw the reason why the default page is not shown under port 8080 as below

  1. Run your default tomcat docker container in detach mode using your favorite shell access utility (eg: putty)

docker run -d --name tomcat-container -p 8080:8080 tomcat-latest

2. Bash access the image

docker exec -it tomcat-container /bin/bash

3. Check the webapps folder under /usr/local/tomcat/webapps

The folder looks empty and that’ why you are finding the issue. No worries..

4. Check the folder found under /usr/local/tomcat/webapps.dist. Here you go. You have all contents available here.

5. Copy everything under the folder /usr/local/tomcat/webapps.dist to /usr/local/tomcat/webapps and that is the fix. Now your Tomcat page is back !