GitXplorerGitXplorer
l

s2i-java

public
8 stars
10 forks
0 issues

Commits

List of commits on branch master.
Verified
d7b3a128840f0c643ef6ae0cd9fecee47ad340af

Merge pull request #3 from vorburger/patch-1

lluiscoms committed 3 years ago
Verified
5621755512b09579e63402ccb221a54890e3f843

Merge pull request #4 from georgettica/patch-1

lluiscoms committed 4 years ago
Verified
133c79204fa80c49adcfe93e288033cc337049f8

Update README.md

ggeorgettica committed 4 years ago
Verified
7925ff9d65aedce19f09bf1478cf6924d7f85f17

add link to fabric8/s2i-java to README

vvorburger committed 6 years ago
Unverified
8c833b2b5bd1d027ab4363886296f702308b0080

Fix typo

lluiscoms committed 8 years ago
Unverified
a58eaf9159a9da273c2d1472f61e08bcd10ac43d

Change travis build to 1.8-all

lluiscoms committed 8 years ago

README

The README file for this repository.

OpenShift S2I Builder for Java Docker images

Build Status

Supported tags and respective Dockerfile links

This repository contains the source for building various versions of the Java application as a reproducible Docker image using source-to-image. Users can choose between RHEL and CentOS based builder images. The resulting image can be run using Docker.

For more information about using these images with OpenShift, please see the official OpenShift Documentation.

For a very similar S2I Java builder with some more options and flexibility, consider fabric8io-images/s2i, AKA fabric8/s2i-java on Docker Hub. It also supports Java 11, in addition to Gradle, Maven and Java 8 as per this blog post.

Versions

Java versions currently provided are:

  • JDK-1.8 + Gradle 2
  • JDK-1.8 + Maven 3
  • JDK-1.8 + Gradle 2 + Maven 3

CentOS versions currently supported are:

  • CentOS7

Installation

To build a Java image, choose either the Maven or Gradle with:

  • Gradle image

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

    $ docker pull luiscoms/s2i-java:1.8-gradle
    

    To build a Java image with Gradle from scratch run:

    $ git clone https://github.com/luiscoms/s2i-java.git
    $ cd s2i-java
    $ make build VERSION=1.8-gradle
    
  • Maven image

    To build a Java image with Maven, you need to run the build on a properly.

    $ git clone https://github.com/luiscoms/s2i-java.git
    $ cd s2i-java
    $ make build VERSION=1.8-maven
    

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

    $ docker pull luiscoms/s2i-java:1.8-maven
    
  • Gradle + Maven image

    To build a Java image with Gradle and Maven, you need to run the build on a properly.

    $ git clone https://github.com/luiscoms/s2i-java.git
    $ cd s2i-java
    $ make build VERSION=1.8-all
    

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

    $ docker pull luiscoms/s2i-java:1.8-all
    

Or

```
$ docker pull luiscoms/s2i-java
```

Notice: By omitting the VERSION parameter, the build/test action will be performed on all provided versions of Java.

Usage

For information about usage of Dockerfile for Java 1.8 with Gradle, see usage documentation.

For information about usage of Dockerfile for Java 1.8 with Maven, see usage documentation.

For information about usage of Dockerfile for Java 1.8 with Gradle and Maven, see usage documentation.

Test

This repository also provides a S2I test framework, which launches tests to check functionality of a simple Java application built on top of the s2i-java image.

Users can choose between testing a Java test application with Gradle or Maven.

  • Gradle image

    $ cd s2i-java
    $ make test VERSION=1.8-gradle
    
  • Maven image

    $ cd s2i-java
    $ make test VERSION=1.8-maven
    
  • Gradle + Maven image

    $ cd s2i-all
    $ make test VERSION=1.8-all
    

Repository organization

  • <jdkVersion-(gradle|maven|all)>

    Dockerfile and scripts to build container images from.

  • hack/

    Folder containing scripts which are responsible for build and test actions performed by the Makefile.