Skip to content

Instantly share code, notes, and snippets.

@jglenn9k
Created July 3, 2018 00:37
Show Gist options
  • Save jglenn9k/1713392aee8d069d3954da04c3101828 to your computer and use it in GitHub Desktop.
Save jglenn9k/1713392aee8d069d3954da04c3101828 to your computer and use it in GitHub Desktop.
Build Docker with Puppet
FROM centos:7
RUN yum -y update && yum clean all
RUN yum -y install http://yum.puppetlabs.com/puppetlabs-release-pc1-el-7.noarch.rpm
RUN yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
RUN yum -y install https://centos7.iuscommunity.org/ius-release.rpm
RUN yum -y install puppet-agent
COPY Puppetfile /Puppetfile
COPY site.pp /site.pp
EXPOSE 80
RUN /opt/puppetlabs/puppet/bin/gem install --no-ri --no-rdoc r10k
RUN /opt/puppetlabs/puppet/bin/r10k puppetfile install Puppetfile
RUN /opt/puppetlabs/bin/puppet apply --modulepath=modules site.pp
COPY htdocs /var/www/html
VOLUME [ "/sys/fs/cgroup" ]
CMD ["/usr/sbin/init"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment