The image is available directly from Docker Hub
s2i-boot(Source-to-Image Builder) let's you create projects targeting SpringBoot Appliction, build with Java OpenJDK 8 and maven
Tested at Openshift 3.6.x
, 3.7.x
- APP_SUFFIX: Jar file suffix to use to locate the generated artifact to use (e.g. xxxxx${APP_SUFFIX}.jar)
- BUILDER_ARGS: Allows you to specify options to pass to maven
- MAVEN_MIRROR_URL: Maven mirror url
- ARTIFACT_DIR: How the locate the Running Artifact. Default is "target".
- ENABLE_NEST_SETTINGS: Enable the s2i builder reading the proejct's configuration/settings.xml. Default is empty, disable.
- MAVEN_ARGS: The maven args. Default is
-e -DskipTests package
- ENABLE_SONAR_PATH: Call
mvn -f ${ENABLE_SONAR_PATH} sonar:sonar
after build. Default is empty, disable. When enable, must settings$NABLE_NEST_SETTINGS
- ENABLE_RELEASE: Call
mvn deploy
, Ignore the MAVEN_ARGS and ENABLE_SONAR_PATH.
- APP_OPTIONS: Options to pass to java -jar app.jar ${APP_OPTIONS}
If you do not specify any BUILDER_ARGS, by default the s2i image will use the following:
MAVEN_ARGS="package -DskipTests"
-
First load all the needed resources in a project.
$ oc create -f https://raw.githubusercontent.com/linzhaoming/s2i-boot/master/openshift/s2i-boot-imagestream.yml
-
Importing the template example
$ oc create -f https://raw.githubusercontent.com/linzhaoming/s2i-boot/master/openshift/example-s2i-boot.yml
-
Once the builder s2i-boot has been registered, you can create an app with:
- Instant app already provided as template
- Using the s2i-boot builder image using a regular Git repository
There is a lot of example SpringBoot applications here