Docker Image packaging for A hardened Apache Tomcat
This image extends the original Docker official image for Apache Tomcat (tomcat:jre8)
It adds security hardening to Apache Tomcat according to OWASP
- Make sure you have Docker installed
- Docker pull the image by running:
$ docker pull eyaldahari/hardenedtomcat
Then run:
$ docker run -it --rm -p 8888:8080 eyaldahari/hardenedtomcat
- Build the image yourself:
-
Download/Clone this repository files to a directory (ex. /home/ubuntu/docker_tomcat)
-
Run the following command:
$ docker build /home/ubuntu/docker_tomcat
-
Run the following command in order to get the new image id
$ docker images
-
Assuming image id is:
dd6a9057831e
. In order to run the Apache Tomcat hardened container run:$ docker run -it --rm -p 8888:8080 dd6a9057831e
-
By default the command that run Tomcat Server is:
$ catalina.sh run
After completing the steps above, a Hardened Tomcat server will be up listenning on port 8888.
In order to connect to the server, open a browser at the following URL: http://docker-host-ip:8888
Once the container exits it will be removed automatically by Docker.