forked from onesysadmin/jenkins-docker-executors
-
Notifications
You must be signed in to change notification settings - Fork 1
/
dockerfile-latest
26 lines (18 loc) · 891 Bytes
/
dockerfile-latest
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
FROM ubuntu:xenial
MAINTAINER Sebin Benjamin <sebinbenjamin@gmail.com>
# expose the port
EXPOSE 8080
# default jenkins home directory
ENV JENKINS_HOME /var/jenkins
# set our user home to the same location
ENV HOME /var/jenkins
# for installing openjdk
RUN apt-get update -qq && apt-get install -qqy openjdk-8-jdk wget curl git iptables ca-certificates apparmor
# set JAVA_HOME environment variable
ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64
# for jenkins
RUN echo deb http://pkg.jenkins-ci.org/debian binary/ >> /etc/apt/sources.list \
&& wget -q -O - http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key | apt-key add -
RUN apt-get update -qq && apt-get install -qqy jenkins
# default command to launch jenkins. specify the JAVA_OPTIONS variable using the “-e” switch.
CMD java -XX:+PrintFlagsFinal -XX:+PrintGCDetails $JAVA_OPTIONS -jar /usr/share/jenkins/jenkins.war