S2I tomcat9 base container for OpenShift / OKD & kubernetes on base of UBI8 and OpenJDK11
- Dockerfile 89.3%
- Shell 10.7%
| kustomize | ||
| apache-tomcat-9.0.58.tar.gz | ||
| docker-entrypoint.sh | ||
| Dockerfile | ||
| HelloUBI.war | ||
| jmx_prometheus_javaagent-0.16.1.jar | ||
| prom.yaml | ||
| Readme.md | ||
| setenv.sh | ||
OCI Container for Tomcat 9
Base:
- Red Hat UBI8
- OpenJDK11
- Tomcat 9
Goal: production ready container with the following features:
- Runnable as S2I container in OpenShift / OKD 4 and kubernetes with RBAC enabled (non-root)
- Minimal changes from the original tomcat 9 distribution
- secure
- upgradable
- use the internal service CA: reencrypt routes are supported
build
podman or docker local
Use either docker or podman:
podman build -t quay.io/pflaeging/tomcat9-openjdk11-ubi8-s2i:1.0 -f Dockerfile .
podman push quay.io/pflaeging/tomcat9-openjdk11-ubi8-s2i:1.0
OpenShift / OKD
- Login to your cluster
oc apply -k kustomize/openshift-build- Now you have an ImagestreamTag with:
tomcat9-openjdk11-ubi8-s2i:latestin your namespace / project
Use
There's a complete kustomize config as example in the folder kustomize. Use kustomize/instancetemplate as instance template!
- Make a layered container and through your
.warfile in/deployments/apache-tomcat/webapps - start the container
- you're done ;-)
ToDo
- get the tomcat archive from another place, not from the git repo
Peter Pfläging <peter@pflaeging.net>