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.
Run dummy container
docker run --name=dummy -it tomcat:8.0.35 bash
create /opt/tomcat directory on docker host
mkdir -p /opt/tomcat
copy tomcat admin folders from the container
docker cp dummy:/opt/tomcat/webapps /opt/tomcat/webapps
Verify that folders are copied to the host
[root@host tomcat]# ls webapps/
host-manager manager ROOT
stop and remove the dummy container
docker stop dummy; docker rm dummy
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
drop your application WAR file into local directory @/opt/tomcat/webapps
You should be able to access the application on port 9080
make changes to your code
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