Public Repository

Last pushed: a year ago
Short Description
Jenkins Image with preinstalled Maven & Java 8
Full Description

Starting docker image

  • docker run -p 8080:8080 -p 50000:50000 --name=jenkins-master --volumes-from=jenkins-data -d omajenkins
    • uses jenkins-data as a data volume

DockerFile:

FROM jenkins:latest
MAINTAINER Timo Heinonen

USER root
RUN mkdir /var/log/jenkins
RUN mkdir /var/cache/jenkins
RUN chown -R jenkins:jenkins /var/log/jenkins
RUN chown -R jenkins:jenkins /var/cache/jenkins

RUN apt-get update
RUN apt-get install -y wget
RUN wget --no-verbose -O /tmp/apache-maven-3.3.9.tar.gz http://archive.apache.org/dist/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz
RUN echo "516923b3955b6035ba6b0a5b031fbd8b /tmp/apache-maven-3.3.9.tar.gz" | md5sum -c

RUN tar xzf /tmp/apache-maven-3.3.9.tar.gz -C /opt/
RUN ln -s /opt/apache-maven-3.3.9 /opt/maven
RUN ln -s /opt/maven/bin/mvn /usr/local/bin
RUN rm -f /tmp/apache-maven-3.3.9.tar.gz

RUN apt-get install -y git

RUN apt-get install -y xvfb

RUN apt-get clean

USER jenkins
ENV MAVEN_HOME /opt/maven

ENV PATH $MAVEN_HOME/bin:$PATH

ENV JENKINS_OPTS="--logfile=/var/log/jenkins/jenkins.log --webroot=/var/cache/jenkins/war"

ENV JAVA_OPTS="-Xmx2048m"

Docker Pull Command
Owner
zapppp