nalbam / s2i-tomcat

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Tomcat - CentOS Docker image

All of that is sampled from Wildfly openshift s2i project

Supported tags and respective Dockerfile links for image s2i-tomcat

This repository contains the source for building various versions of the Tomcat application as a reproducible Docker image using source-to-image. The resulting image can be run using Docker.

Versions

CentOS versions currently provided are:

  • CentOS 7

Tomcat versions currently provided are:

  • Tomcat v8
  • Tomcat v8.5

Java versions currently provided are:

  • Openjdk 8

Maven versions currently provided are:

  • Maven 3.5

Installation

This image is available on DockerHub. To download it, run:

$ docker pull bespinsbl/s2i-tomcat:$TOMCAT_VERSION-jdk-$JDK_VERSION

for example

$ docker pull bespinsbl/s2i-tomcat:8.5-jdk-8 

Usage

To build a simple java maven tomcat using standalone S2I and then run the resulting image with Docker execute:

$ s2i build git://github.com/bespin-sbl/sample-tomcat bespin-sbl/s2i-tomcat:8.5-jdk-8 sample-tomcat
$ docker run -p 8080:8080 sample-tomcat

Accessing the application:

$ curl 127.0.0.1:8080

Repository organization

  • <Tomcat-version>
    • <Java-version>
      • Dockerfile CentOS based Dockerfile
      • s2i/bin/ This folder contains scripts that are run by S2I:
        • assemble Build Java Code with Maven.
        • run Run Apache-Tomcat application server.
      • contrib/
        • setting.xml A setting.xml file.

Image version structure

Structure: name/1-2-3
  1. Platform version - 8.5
  2. a dash "-"
  3. Java version - jdk-8

Example: bespinsbl/s2i-tomcat:8.5-jdk-8

Environment variables

To set environment variables, you can place them as a key value pair into a .sti/environment file inside your source code repository or add -e FOO=BAR to s2i build -e FOO=BAR .

  • MAVEN_ARGS

    Overrides the default arguments passed to maven durin the build process

  • MAVEN_ARGS_APPEND

    This value will be appended to either the default maven arguments, or the value of MAVEN_ARGS if MAVEN_ARGS is set.

  • WAR_NAME

    Name of the war file to move into webapps directory after maven build WAR_NAME=*.war

  • POM_PATH

    Useful for many pom.xml git repositories, specify the path to follow into the repo to find the pom file to use. default to POM_PATH=.

  • VERSION

    This value will be replace to package version.

Copyright

Released under the Apache License 2.0. See the LICENSE file.

About

License:MIT License


Languages

Language:Shell 100.0%