Public | Automated Build

Last pushed: 2 years ago
Short Description
Tomcat 8 container
Full Description

Vanilla Tomcat 8 server

This docker machine uses:

  • CentOS 7
  • Java 8
  • Tomcat 8
  • Apache

In order to avoid having webapps disappear I recommend creating a folder somewhere and attaching the volume to the container.
Tomcat is installed at /opt/tomcat thus to override configurations this server can be started like this:

# Runs on the host that is going to run the docker container
WEBAPPS_DIR=/some/path/tomcat-webapps
CONF_DIR=/some/path/tomcat/conf

docker run -it -d \
    -v $WEBAPPS_DIR:/opt/tomcat/webapps \
    -v $CONF_DIR/tomcat-users.xml:/opt/tomcat/conf/tomcat-users.xml \
    -v $CONF_DIR/server.xml:/opt/tomcat/conf/server.xml \
    -p 8080:8080 \
    wizard9/3p-tomcat8:latest

Note: This server also runs apache so you can provide an httpd.conf file with ajp forward to sites with virtual hosts to get rid of the context paths on your sites. To do this add a mapping for an httpd.conf file like this:

    -v /path/to/httpd.conf:/etc/httpd/conf/httpd.conf
Docker Pull Command
Owner
wizard9
Source Repository