Docker repo for a Tomcat-based container. This Dockerfile has no external files to copy or add, so it can be used as a standalone file to get up and running.
This Dockerfile with all default values will build a base container image running Apache Tomcat version 8.0.20 with OpenJDK 8u40.
docker build [--rm=true] [--tag=<your-tag>] [--file=<relative-path-to-this-Dockerfile>]
when --file is not specified, it defaults to ./Dockerfile in the current directory.
docker build --rm=true --tag=falcon-tomcat:8.0.20 .
this builds the container with the specified tag using the current directory Dockerfile file.
Running the built image
The following environment variables are exposed (default values indicated):
- TOMCAT_MAJOR (8)
- TOMCAT_VERSION (8.0.20)
- TOMCAT_DL_URL (see Dockerfile)
- CATALINA_HOME (/usr/local/tomcat)
- PATH ($CATALINA_HOME/bin:$PATH)
- TOMCAT_ENV (
localif not specified). This value is used in the setenv.sh file (passed as
- MANAGER_USER (admin)
- MANAGER_PW (password)
docker run -d -p 8080:8080 pdzilla/tomcat
Defaults with different environment:
docker run -d -p 8080:8080 -e "TOMCAT_ENV=<new_env_name>" --name tomcat pdzilla/tomcat
- Does not add the 'admin-script' role to use the "Host Manager" feature.
- Configured for HTTP not HTTPS with no automated way to change it in the Dockerfile. Users should add their own SSL/TLS solution on top of this base image and
- Tomcat JVM memory settings not currently configurable (512 min 1024 max)
- You need to re-build to change the
MANAGER_PWvalues. I'll fix that when I can, or submit a PR and I'll review it.
Want to contribute to this? I'm both humbled and honestly a little surprised. PRs and issues are welcome. Please verify against Docker 1.7 before committing