-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
49 lines (41 loc) · 1.87 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:14.04
MAINTAINER voxsim-mala "https://github.com/malavolti/docker-puppetagent"
ENV DEBIAN_FRONTEND noninteractive
# Install puppet agent
#RUN echo "deb http://archive.ubuntu.com/ubuntu trusty main universe multiverse" > /etc/apt/sources.list
RUN echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d
RUN apt-get update
RUN apt-get install -y wget ruby augeas-tools python-jinja2 git
RUN wget -q https://apt.puppetlabs.com/puppetlabs-release-trusty.deb -O /tmp/puppetlabs.deb
RUN dpkg -i /tmp/puppetlabs.deb
RUN apt-get -y install puppet puppetmaster
#ADD puppet.conf /etc/puppet/puppet.conf
# Download IdP in the cloud puppet code
WORKDIR /opt
#RUN git clone https://github.com/ConsortiumGARR/Puppet-GARRShibbolethIdP.git /opt/Puppet-GARRShibbolethIdP
RUN git clone https://github.com/biancini/Puppet-GARRShibbolethIdP.git /opt/Puppet-GARRShibbolethIdP
WORKDIR /opt/Puppet-GARRShibbolethIdP
RUN git submodule init
RUN git submodule update
WORKDIR /opt/Puppet-GARRShibbolethIdP/garr-common
RUN git submodule init
RUN git submodule update
WORKDIR /etc/puppet/modules
RUN for i in /opt/Puppet-GARRShibbolethIdP/puppetlabs/*; do ln -s $i; done
RUN for i in /opt/Puppet-GARRShibbolethIdP/garr-common/garr/*; do ln -s $i; done
RUN for i in /opt/Puppet-GARRShibbolethIdP/garr-common/puppetlabs/*; do ln -s $i; done
RUN for i in /opt/Puppet-GARRShibbolethIdP/garr/*; do ln -s $i; done
#RUN touch /etc/puppet/manifests/site.pp
#RUN mkdir /etc/puppet/manifests/nodes
# Create custom files for IdP and generate site.pp
# execute prepare_puppetmaster.sh to create default keys and files for IdP
WORKDIR /tmp
ADD prepare_puppetmaster.sh /opt/Puppet-GARRShibbolethIdP/scripts/prepare_puppetmaster.sh
RUN /bin/bash /opt/Puppet-GARRShibbolethIdP/scripts/prepare_puppetmaster.sh
# generate_sitepp.py
ADD /tmp/site.pp /etc/puppet/manifests/site.pp
EXPOSE 22
EXPOSE 443
EXPOSE 8443
WORKDIR /root
CMD ["/bin/bash"]