This project uses docker to auto deploy a java web application to tomcat. You can choose to select a war file from your local file system or download from a private maven repository.
The following components are used:
- Java 7
- Docker
- Apache Tomcat
-
You need Docker installed: Docker Setup Guide
-
Make sure your default docker machine is listed:
docker-machine ls
Otherwise you have to create one
docker-machine create -d virtualbox --engine-env KEY=VALUE default
-
Build the image:
This builds a docker image with tomcat set up
$bin/build.sh
-
Start/run the image:
This runs the image and deploys the application war file to webapps folder under tomcat.
$bin/start.sh
For debugging, a temporary folder with mapped folders to logs and webapps folder under tomcat is created. You can change the location in settings.sh.
-
Stop the image:
This stops the running tomcat and thereby stopping the docker image.
$bin/stop.sh
It will also remove all temporary folders created when start command is run.
-
Destroy the image:
This destroys the created docker image.
$bin/destroy.sh