-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile.passenger
52 lines (34 loc) · 1.75 KB
/
Dockerfile.passenger
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
51
52
# buildah bud --layers --tag puppet_passenger -f Dockerfile.passenger
# podman run --hostname puppet.int.localdomain -p 8140:8140 -it puppet_passenger
FROM centos:stream8
WORKDIR /home/root/puppetmaster
RUN yum -y install http://yum.puppet.com/puppet-release-el-8.noarch.rpm
RUN yum -y install puppet-agent
# For compiling gems
RUN yum -y install libyaml glibc-headers autoconf gcc gcc-c++ glibc-devel readline-devel make automake libtool bison sqlite-devel
RUN /opt/puppetlabs/puppet/bin/gem install msgpack --no-document
RUN yum -y install epel-release
RUN yum -y install mod_passenger mod_ssl httpd-devel passenger-devel procps-ng
RUN mv /etc/httpd/conf.d/ssl.conf /etc/httpd/conf.d/ssl.bak
RUN sed -i 's|PassengerRoot.*|PassengerRoot /usr/share/ruby/vendor_ruby/phusion_passenger/locations.ini|' /etc/httpd/conf.d/passenger.conf
RUN mkdir /var/run/passenger-instreg
RUN yum -y install ca-certificates
RUN useradd -m puppet
ADD ./conf/auth.conf /etc/puppetlabs/puppet/auth.conf
RUN chown puppet:puppet /etc/puppetlabs/puppet/auth.conf
RUN chmod o-rwx /etc/puppetlabs/puppet/auth.conf
RUN /opt/puppetlabs/puppet/bin/gem install rack --no-document
RUN mkdir -p /usr/share/puppet/server/{public,tmp}
ADD ext/rack/config.ru /usr/share/puppet/server/config.ru
RUN chown -R puppet:puppet /usr/share/puppet
ADD puppet_apache.conf /etc/httpd/conf.d/puppet_apache.conf
ADD lib /usr/share/puppet_webrick/lib
ADD puppet_server /usr/share/puppet_webrick
ADD puppet_ca /usr/share/puppet_webrick
ADD ext /usr/share/puppet_webrick/ext
RUN mkdir -p /etc/puppetlabs/puppet/ssl/certificate_requests
RUN chown -R puppet:puppet /etc/puppetlabs/puppet
RUN chmod -R o-rwx /etc/puppetlabs/puppet
ADD entrypoint.sh /usr/local
RUN chmod +x /usr/local/entrypoint.sh
CMD ["/usr/local/entrypoint.sh"]