-
Notifications
You must be signed in to change notification settings - Fork 35
/
Dockerfile
executable file
·42 lines (33 loc) · 1.25 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
# This file was generated by ansible for localhost
FROM ansibleshipyard/ansible-base-ubuntu
# Volume can be accessed outside of container
VOLUME [/var/lib/jenkins]
MAINTAINER Alban Andrieu "https://github.com/AlbanAndrieu"
ENV DEBIAN_FRONTEND noninteractive
ENV JENKINS_HOME /var/lib/jenkins
ENV WORKDIR /home/vagrant
# Working dir
WORKDIR /home/vagrant
RUN pwd
RUN ls -lrta
# ADD
ADD defaults $WORKDIR/AlbanAndrieu/Stouts.jenkins/defaults
ADD meta $WORKDIR/AlbanAndrieu/Stouts.jenkins/meta
ADD files $WORKDIR/AlbanAndrieu/Stouts.jenkins/files
ADD handlers $WORKDIR/AlbanAndrieu/Stouts.jenkins/handlers
ADD tasks $WORKDIR/AlbanAndrieu/Stouts.jenkins/tasks
ADD templates $WORKDIR/AlbanAndrieu/Stouts.jenkins/templates
ADD vars $WORKDIR/AlbanAndrieu/Stouts.jenkins/vars
# Here we continue to use add because
# there are a limited number of RUNs
# allowed.
ADD hosts /etc/ansible/hosts
ADD jenkins-master.yml $WORKDIR/AlbanAndrieu/Stouts.jenkins/jenkins-master.yml
# Execute
RUN pwd
RUN ls -lrta
RUN ansible-playbook $WORKDIR/AlbanAndrieu/Stouts.jenkins/jenkins-master.yml -c local -vvvv
#TODO improve below port range
EXPOSE 21:9999
ENTRYPOINT ["/etc/init.d/jenkins", "start"]
CMD ["-g", "deamon off;"]