-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile.master
9 lines (8 loc) · 1.52 KB
/
Dockerfile.master
1
2
3
4
5
6
7
8
9
FROM phusion/baseimage:0.9.16
# Install dev tools: jdk, git etc...
RUN rm -f /etc/service/sshd/down
CMD ["/sbin/my_init"]
RUN /etc/my_init.d/00_regen_ssh_host_keys.sh
ADD shared/keys /tmp/
ADD shared/puppetlabs-release-trusty.deb /tmp/
RUN chmod a+r /tmp/id_rsa*;cat /tmp/id_rsa.pub >> /root/.ssh/authorized_keys;cp /tmp/id_rsa* /root/.ssh/;groupadd vagrant;useradd -g vagrant -m -G adm vagrant;sudo -u vagrant mkdir /home/vagrant/.ssh;sudo -u vagrant cp /tmp/id_rsa* /home/vagrant/.ssh/;sudo -u vagrant chmod go-rwx /home/vagrant/.ssh/* ;sudo -u vagrant cat /tmp/id_rsa.pub >> /home/vagrant/.ssh/authorized_keys;rm /tmp/id_rsa*;chown -R vagrant:vagrant /home/vagrant;dpkg -i /tmp/puppetlabs-release-trusty.deb;apt-get update;apt-get -y install puppetmaster-passenger;apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* ;/etc/init.d/apache2 stop;rm -rf /var/lib/puppet/ssl/*;sed -e '/templatedir/d' -e '/certname.*$/d' -e '/dns_alt_names.*$/d' -e 's/\[master\]/\[master\]\ncertname = puppetmaster.calavera.biz\ndns_alt_names =puppetmaster,puppetmaster.calavera.biz,puppet\n/g' /etc/puppet/puppet.conf > /tmp/puppet.conf ; sed -e 's/SSLCertificateFile.*$/SSLCertificateFile \/var\/lib\/puppet\/ssl\/certs\/puppetmaster.calavera.biz.pem/g' -e 's/SSLCertificateKeyFile.*/SSLCertificateKeyFile \/var\/lib\/puppet\/ssl\/private_keys\/puppetmaster.calavera.biz.pem/g' /etc/apache2/sites-available/puppetmaster.conf > /tmp/apache.tmp; mv /tmp/apache.tmp /etc/apache2/sites-available/puppetmaster.conf ;mv /tmp/puppet.conf /etc/puppet/puppet.conf