Public | Automated Build

Last pushed: 22 days ago
Short Description
Short description is empty for this repo.
Full Description

Docker container: CentOS 7 + Java 8 + Tomcat 8

Build the image

git clone
cd centos-tomcat
docker build -t kirillf/centos-tomcat .

How to use

Put your war under the /opt/tomcat/webapps directory and run the following command.

docker run -v /opt/tomcat/webapps:/opt/tomcat/webapps -v /opt/tomcat/logs:/opt/tomcat/logs -p 8080:8080 -i -t --name centos-tomcat kirillf/centos-tomcat

Once you run it, you can start the container with docker start centos-tomcat in next time and log file will be under the /opt/tomcat/logs directory.

Also, if you got some error, you can remove the container with docker rm centos-tomcat. Your current container list will be show with docker ps -a.

For Mac user, you must share the directory /opt/tomcat/webapps and /opt/tomcat/logs on Docker > Preferences > File Sharing.


If you got error while build the docker image, please check the latest version of Java and Tomcat.

Software Version Note
CentOS 7
Java 8u144 Java Release Note
Apache Tomcat 8.5.20 Tomcat Download Page

Docker Official Image for Tomcat is also available.

Docker Pull Command
Source Repository

Comments (2)
15 days ago

Hi Sir,
How to put the war under the webapps ??
thanks a lot.

3 months ago

Tried many Tomcat 8 images from Git and Docker Hub, but nothing worked as expected. This one worked awesome. My 2 days stuggle on a small project got over in few minutes.
Thanks for Kirillf. you are awesome.