This repository was archived by the owner on Jul 23, 2019. It is now read-only.
forked from rancher/jenkins-master
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
49 lines (38 loc) · 1.63 KB
/
Dockerfile
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
FROM ubuntu:xenial
MAINTAINER Dylan Pinn <[email protected]>
# expose the port
EXPOSE 8080
# required to make docker in docker to work
VOLUME /var/lib/docker
# default jenkins home directory
ENV JENKINS_HOME /var/jenkins
# set our user home to the same location
ENV HOME /var/jenkins
# set our wrapper
ENTRYPOINT ["/usr/local/bin/docker-wrapper"]
# default command to launch jenkins
CMD java -jar /usr/share/jenkins/jenkins.war
# setup our local files first
ADD docker-wrapper.sh /usr/local/bin/docker-wrapper
RUN apt-get update && apt-get -y install \
apt-transport-https \
ca-certificates \
curl \
software-properties-common
RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
RUN add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
RUN apt-get update && apt-get -y install docker-ce
# # for installing docker related files first
# RUN echo deb http://archive.ubuntu.com/ubuntu xenial universe > /etc/apt/sources.list.d/universe.list
# apparmor is required to run docker server within docker container
RUN apt-get update && apt-get install -y wget curl git iptables ca-certificates apparmor
# now we install docker in docker - thanks to https://github.com/jpetazzo/dind
# We install newest docker into our docker in docker container
# RUN curl -fsSL https://get.docker.com/ | sh
# for jenkins
RUN echo deb http://pkg.jenkins-ci.org/debian binary/ >> /etc/apt/sources.list \
&& wget -q -O - https://pkg.jenkins.io/debian/jenkins-ci.org.key | apt-key add -
RUN apt-get update && apt-get install -y jenkins