S2I tomcat9 base container for OpenShift / OKD & kubernetes on base of UBI8 and OpenJDK11
  • Dockerfile 89.3%
  • Shell 10.7%
Find a file
2022-02-23 11:48:37 +01:00
kustomize add jmx prom 2022-02-23 11:48:37 +01:00
apache-tomcat-9.0.58.tar.gz Initial commit 2022-02-11 15:54:07 +01:00
docker-entrypoint.sh Initial commit 2022-02-11 15:54:07 +01:00
Dockerfile add jmx prom 2022-02-23 11:48:37 +01:00
HelloUBI.war Initial commit 2022-02-11 15:54:07 +01:00
jmx_prometheus_javaagent-0.16.1.jar add jmx prom 2022-02-23 11:48:37 +01:00
prom.yaml add jmx prom 2022-02-23 11:48:37 +01:00
Readme.md add jmx prom 2022-02-23 11:48:37 +01:00
setenv.sh add jmx prom 2022-02-23 11:48:37 +01:00

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:latest in 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 .war file 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>