# 下载源码包 RUN wget http://cache.ruby-lang.org/pub/ruby/2.1/ruby-2.1.5.tar.gz RUN wget https://downloads.puppetlabs.com/puppet/puppet-3.7.2.tar.gz RUN tar -zxf ruby-2.1.5.tar.gz RUN tar -zxf puppet-3.7.2.tar.gz
# 编译, 将文档以及一些模块屏蔽掉 RUNcd ruby-2.1.5 \ && ./configure --prefix=/opt/puppet37 --disable-install-doc --disable-install-rdoc --disable-install-capi \ && make -j8 \ && make install
# In debian9, there is no library, wo need copy it. RUNcp /usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0 /opt/puppet37/lib/ RUNcp /usr/lib/x86_64-linux-gnu/libssl.so.1.0.0 /opt/puppet37/lib/
# Must specify the version, newer facter will block the puppet. RUN /opt/puppet37/bin/gem install hiera -v 1.3.4 RUN /opt/puppet37/bin/gem install facter -v 2.2.0
# 安装Puppet RUN /opt/puppet37/bin/ruby /home/puppet-3.7.2/install.rb --no-rdoc
# 打包 RUN tar -cf puppet37_2_1_5.tar /opt/puppet37 RUN xz -9 puppet37_2_1_5.tar