Public Repository

Last pushed: 2 years ago
Short Description
CentOS 7, Oracle JDK 7u51 and Tomcat 8.0.35 based docker container.
Full Description

The container Exports a volume on /opt/tomcat/webapps.
You can mount the volume on run to a local directory containing your war file.

Use admin/admin to login tomcat admin page

Follow the below instructions to run the tomcat container.

  1. Run dummy container
    docker run --name=dummy -it tomcat:8.0.35 bash

  2. create /opt/tomcat directory on docker host
    mkdir -p /opt/tomcat

  3. Change directory
    cd /opt/tomcat

  4. copy tomcat admin folders from the container
    docker cp dummy:/opt/tomcat/webapps /opt/tomcat/webapps

  5. Verify that folders are copied to the host
    [root@host tomcat]# ls webapps/
    host-manager manager ROOT

  6. stop and remove the dummy container
    docker stop dummy; docker rm dummy

  7. Run actual tomcat container with admin
    docker run --name=tomcatdev -d -p 9080:8080 -v /opt/tomcat/webapps:/opt/tomcat/webapps tomcat:8.0.35

  8. drop your application WAR file into local directory @/opt/tomcat/webapps

  9. You should be able to access the application on port 9080

  10. make changes to your code

  11. drop the updated WAR file into local directory ( as in step 7 above )and verify that changes are reflected immediately.

please be noted that steps 1 to 6 above are optional. follow them if you need to access tomcat admin page

Docker Pull Command