-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdockerfile
More file actions
41 lines (35 loc) · 1.34 KB
/
Copy pathdockerfile
File metadata and controls
41 lines (35 loc) · 1.34 KB
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
FROM jenkins/jenkins:lts
USER root
####### INSTALL DOCKER CLI
RUN set -eux; \
apt-get update; \
apt-get install -y --no-install-recommends \
gnupg2 \
software-properties-common; \
curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add -; \
add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/debian \
$(lsb_release -cs) \
stable"; \
apt-get install software-properties-common; \
apt-get update; \
#apt-add-repository --yes --update ppa:ansible/ansible; \
apt-get install -y ansible; \
apt-get install -y --no-install-recommends \
docker-ce-cli \
containerd.io; \
rm -rf /var/lib/apt/lists/*
USER jenkins
####### INSTALL PLUGINS #########
COPY plugins.txt /usr/share/jenkins/ref/plugins.txt
RUN /usr/local/bin/install-plugins.sh \
< /usr/share/jenkins/ref/plugins.txt
####### DISABLE SETUP WIZARD #######
RUN echo $JENKINS_VERSION > \
/usr/share/jenkin/ref/jenkins.install.UpgradeWizard.state; \
echo $JENKINS_VERSION > \
/usr/share/jenkins/ref/jenkins.install.InstallUtil.lastExecVersion
####### CONFIGURE JENKINS AND INSTALLED PLUGINS #######
ENV CASC_JENKINS_CONFIG /var/jenkins_home/casc_configs
RUN mkdir -p /var/jenkins_home/casc_configs
COPY jenkins.yaml /var/jenkins_home/casc_configs/jenkins.yaml