This repository was created with the for solve the problem of deploying .war packages on a docker environment. Yes, there are many versions available on Docker, ready to be used, but as often happens in Java, sometimes you need to work on specific and custom versions.
This repository offers a quick solution to this problem.
-
On Dockerfile, insert the java version of your environment:
Example:
RUN apk add openjdk17-jre curl bash
Some versions available here.
-
On /conf/tomcat.service, replace with your java version path:
Example:
Environment="JAVA_HOME=/usr/lib/jvm/YOUR-JAVA-PATH"
-
On docker-compose.yml file set your .war source and destination paths:
Example:
- ./LOCAL-FILE.war:/opt/tomcat/webapps/CONTAINER-FILE.war
-
Start the environment and check logs:
docker compose up