Public Repository

Last pushed: 2 years ago
Short Description
This repository provides a continuous integration container from Ubuntu 14.04 LTS, plus Oracle Java 8, Jenkins 1.574, Maven 3, Git and Nano.
Full Description

Deprecated - use the automated build at https://registry.hub.docker.com/u/stephenreed/jenkins-java8-maven-git/

This repository provides a continuous integration container from Ubuntu 14.04 LTS, plus Oracle Java 8, Jenkins 1.574, Maven 3, Git and Nano. The Jenkins GitHub plugin has also been installed.

Sets up a container with jenkins installed listening on port 8080.

Usage

To run the container, do the following:

sudo docker run -t -i -p 8080:8080 -v /etc/localtime:/etc/localtime:ro -P stephenreed/java8-jenkins-maven-git-nano

To start Jenkins from the container's command prompt . . .

java -jar opt/jenkins.war

You can configure Jenkins continuous integration jobs at http://127.0.0.1:8080

Dockerfile

# Ubuntu 14.04 LTS
# Oracle Java 1.8.0_11 64 bit
# Maven 3.0.5-1
# Jenkins 1.574
# Nano 2.2.6-1ubuntu1

FROM ubuntu:14.04

MAINTAINER Stephen L. Reed (http://texai.org)

# install wget
RUN apt-get update && apt-get install -y wget && apt-get clean

# set shell variables for java installation
ENV java_version 1.8.0_11
ENV filename jdk-8u11-linux-x64.tar.gz
ENV downloadlink http://download.oracle.com/otn-pub/java/jdk/8u11-b12/$filename

# download java, accepting the license agreement
RUN wget --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" -O /tmp/$filename $downloadlink 

# unpack java
RUN mkdir /opt/java-oracle && tar -zxf /tmp/$filename -C /opt/java-oracle/

# configure Java environment variables
ENV JAVA_HOME /opt/java-oracle/jdk$java_version
ENV PATH $JAVA_HOME/bin:$PATH

# configure symbolic links for the java and javac executables
RUN update-alternatives --install /usr/bin/java java $JAVA_HOME/bin/java 20000 && update-alternatives --install /usr/bin/javac javac $JAVA_HOME/bin/javac 20000

# install maven
RUN apt-get install -y maven
ENV MAVEN_HOME /usr/share/maven

# install git
RUN apt-get install -y git

# install nano
RUN apt-get install -y nano

# remove download archive files
RUN apt-get clean

# copy jenkins war file to the container
ADD http://mirrors.jenkins-ci.org/war/1.574/jenkins.war /opt/jenkins.war
RUN chmod 644 /opt/jenkins.war

# configure Jenkins environment variables
ENV JENKINS_HOME /jenkins

# configure the container to run jenkins, mapping container port 8080 to that host port
ENTRYPOINT ["java", "-jar", "/opt/jenkins.war"]
EXPOSE 8080
CMD [""]
Docker Pull Command
Owner
stephenreed