forked from alfredodeza/pipeline-jobs
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
54 lines (35 loc) · 1.39 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
50
FROM jenkins/jenkins:latest
#Ref: https://github.com/jenkinsci/docker/blob/master/README.md
#jenkins/jenkins:lts defaults to /var/jenkins_home
# set home directory for jenkins
ENV JENKINS_HOME /var/jenkins_home
ENV WORK_DIR /usr/local/bin
USER root
RUN apt-get update
RUN apt-get install -y vim &&\
apt-get install -y python3 &&\
apt-get install -y python3-venv &&\
apt-get install -y python-pip
RUN pip install awscli &&\
pip install jenkins-job-builder &&\
pip install python-jenkins
# Jenkins home directoy is a volume, so configuration and build history
# can be persisted and survive image upgrades
VOLUME /var/jenkins_home
# volume for RDF data dumps
VOLUME /rdf
# volume for debugging
VOLUME /tmp
USER jenkins
# set home directory for jenkins
ENV JENKINS_HOME /var/jenkins_home
COPY plugins-minimal.txt /usr/share/jenkins/ref/plugins.txt
RUN /usr/local/bin/install-plugins.sh < /usr/share/jenkins/ref/plugins.txt
RUN mkdir -p /var/jenkins_home/.aws && chown jenkins /var/jenkins_home/.aws
COPY --chown=jenkins github-pipeline/ $WORK_DIR/github-pipeline
COPY --chown=jenkins jenkins-job-builder/ $WORK_DIR/jenkins-job-builder
#Runs scripts in lexicographical order on container launch
COPY --chown=jenkins src/init.groovy.d/ /usr/share/jenkins/ref/init.groovy.d
COPY --chown=jenkins src/bash/ $WORK_DIR/jenkins-bash
# auto job builder @ /usr/local/bin/jenkins-jobs
WORKDIR $WORK_DIR/