tomcat icon indicating copy to clipboard operation
tomcat copied to clipboard

Introduce Tomcat Source-to-Image (S2I)

Open maxime-beck opened this issue 6 years ago • 4 comments

Tomcat - Source-to-Image (S2I)

This resource provides a CentOS-based Docker image that enables Source-to-Image building for Tomcat. It builds the sources of a webapp and deploys it to a fully functional containerized Tomcat Server. The generated image can then easily be run locally or deployed to a Kubernetes-based Server.

Usage

  1. Build an image:
$ s2i build [SOURCE_URL] tomcat-s2i my-webapp-image

Where [SOURCE_URL] is either the URL to a Git repository or a path to local sources.

  1. Run it:
$ docker run -p 8080:8080 my-webapp-image

maxime-beck avatar Aug 12 '19 15:08 maxime-beck

I am against pulling this one for several reasons:

  • This is CentOS-specific and OpenShift
  • Someone has to maintain it, likely none of us won't
  • It duplicates several configuration files

This is best handled by the community or by Red Hat ($$$)

michael-o avatar Aug 12 '19 15:08 michael-o

Actually using Alpine like in res/tomcat-maven/Dockerfile might be a good idea. The tool to build the image is independent of Openshift and the image will run in Kubernetes too.

jfclere avatar Aug 13 '19 12:08 jfclere

Yes, switching to Alpine is definitely possible. I can update the PR if needed.

maxime-beck avatar Aug 20 '19 11:08 maxime-beck