Public Repository

Last pushed: 2 years ago
Short Description
This contains the jenkins image with maven , ant and java 8 installed.
Full Description

This docker image uses bases ubuntu 14.04 with essential software needed by jenkin run time

The softwares that are installed

  1. maven
  2. git
  3. ant
  4. Java8
  5. nano editor
  6. s3fs (for mounting s3) and dependencies.

use the below command to mount s3

docker run -d --name jenkins --privileged -p 8080:8080 \
                        -e AWS_ACCESS_KEY=<your access key>            \
                        -e AWS_SECRET_ACCESS_KEY=<your secret key>  \
                        -e AWS_S3_BUCKET=<your bucket>  \
                        -v `pwd`/config_script.sh:/tmp/config_script.sh \
                        anupash147/jenkins_essentials

###config_script.sh

#!/bin/bash

# write the AWS secrets to .passwd-s3fs file for usage by the s3fs command 
echo $AWS_ACCESS_KEY:$AWS_SECRET_ACCESS_KEY > ${HOME}/.passwd-s3fs
echo "secret keys" $AWS_ACCESS_KEY:$AWS_SECRET_ACCESS_KEY
chmod 600 ${HOME}/.passwd-s3fs

#changing jenkins home to the copied s3 location
export JENKINS_HOME=/var/jenkins

# create the directories of exploring the jenkins war file and
#  then copying to s3 linkup directory
 mkdir $JENKINS_HOME

# setup the s3 bucket to the /tmp/data directory
s3fs $AWS_S3_BUCKET $JENKINS_HOME -ouse_cache=/tmp

sleep 5

# Run fresh version of jenkins
java -jar /opt/jenkins.war
Docker Pull Command
Owner
anupash147

Comments (0)