Public | Automated Build

Last pushed: 2 years ago
Short Description
enRoute Application [s2i]( Docker builder image
Full Description

enRoute App Docker Builder

The enroute examples Docker source-to-image builder image.

This base builder image could be used to build the enRoute example applications as Docker images



  • Dockerfile - the base docker image which is built from kameshsampath/jpm4j, this will result in a builder image called kameshsampath/enroute-app which will be later used to build the actual enroute example application image
  • assemble - the script used to assemble the application using enRoute gradle build
  • run - the script to run the application via docker
  • save-artifacts - to save the artifacts for future builds
  • usage - the help and usage script that will be fired when executing the command s2i -h

Environment Variables

  • ENROUTE_APP - if you have many *.application within the sources, this variable will be used to determine which Application to deploy and build the container image for

  • ENROUTE_APP_BND_RUN - the bndrun file name without bndrun extension, which will be used to expor the executable jar

  • JPM_COMMAND - the command name to use to launch the application, this command name will be used to run the docker container, typically this corresponds to the header value of JPM-Command in ENROUTE_APP_BND_RUN file


Lets take an example of making the enRoute Web Application Example as docker image. To build the Docker image we need to execute the following s2i command
s2i build -e "ENROUTE_APP=osgi.enroute.examples.webserver.application" -e "ENROUTE_APP_BND_RUN=osgi.enroute.examples.webserver" -e "JPM_COMMAND=websrvr" kameshsampath/enroute-app enroute-webserver-app

The above command will pull the sources from the enRoute Git Repo and build he code inside the builder image kameshsampath/enroute-app and produces a enRoute webserver example application by name enroute-webserver-app

Instead of using Git Repo, the local file system directoy of the application could also be specified, the command corresponding to local file repo looks like

s2i build -e "ENROUTE_APP=osgi.enroute.examples.webserver.application" -e "ENROUTE_APP_BND_RUN=osgi.enroute.examples.webserver" -e "JPM_COMMAND=websrvr" /home/acme/osgi.enroute.examples kameshsampath/enroute-app enroute-webserver-app


Docker Pull Command
Source Repository