BuildOn Base Image

Base Image

Base image is being built using docker build command. Dockerfile is the key to build the base image. Prerequisite tools/scripts should be defined in Dockefile. Container will spawn with the tools/scripts/utilities based on the Dockerfile definition. Base Image can be pushed to DockerHub/Nexus 3.x or any of the supported docker registries for further usage.

How to Build Base Image ?

docker build -t dockerRepositoryName:tag

e.g. "docker build -t devopsbasservice/buildonframework:buildon-jenkinsfile"

BuildOn Base Image location: https://hub.docker.com/r/devopsbasservice/buildonframework/

Base Image name: devopsbasservice/buildonframework:buildonJenkinsfile2.0

Tools bundled 

  • Jenkins 2.60.1
  • Utilities: wget, curl, zip, tree, elinks, openssh-server, tini, git, oracle-java8-installer
  • Apache maven 3.3.9

Scripts/files

Docker file has the following key components:

  • jenkins.sh – Entry point of the image. Extracts jenkins.war, makes Jenkins up and running, creates jobs based on job.yaml file, and post-execution, ships logs to Kubernetes master.
  • install-plugins.sh – Shell script to install plugins mentioned in plugins.txt automatically resolving the dependent plugins as well.
  • plugins.txt – Plugins required for the build. Any number of plugins can be mentioned.
  • ScalrJenkins Plugin (custom) - com.hpi.ScalrJenkins.ScalrJenkins.xml file with SCALR URL and API keys configured.