我正在尝试puppet-client
安装docker
centos-latest
这个dockerfile
# Base OS
FROM centos
# Install puppet
ENV PUPPET_VERSION 3.7.3
RUN rpm --import https://yum.puppetlabs.com/RPM-GPG-KEY-puppetlabs && rpm -ivh http://yum.puppetlabs.com/puppetlabs-release-el-6.noarch.rpm
RUN yum install -y yum-utils && yum-config-manager --enable centosplus >& /dev/null
RUN yum install -y puppet-$PUPPET_VERSION
但是当我运行它时我得到
---> Package ruby-irb.noarch 0:2.0.0.598-24.el7 will be installed
---> Package ruby-shadow.x86_64 1:2.2.0-2.el6 will be installed
--> Processing Dependency: libruby.so.1.8()(64bit) for package: 1:ruby-shadow-2.2.0-2.el6.x86_64
--> Finished Dependency Resolution
Error: Package: ruby-augeas-0.4.1-3.el6.x86_64 (puppetlabs-deps)
Requires: libruby.so.1.8()(64bit)
Error: Package: 1:ruby-shadow-2.2.0-2.el6.x86_64 (puppetlabs-deps)
Requires: libruby.so.1.8()(64bit)
Error: Package: ruby-augeas-0.4.1-3.el6.x86_64 (puppetlabs-deps)
Requires: ruby(abi) = 1.8
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
INFO[0003] The command [/bin/sh -c yum install -y puppet-$PUPPET_VERSION] returned a non-zero code: 1
如何修复该dockerfile
脚本?(注意:我希望使用最新的centos
)
答案1
通过替换解决:
http://yum.puppetlabs.com/puppetlabs-release-el-6.noarch.rpm
和:
http://yum.puppetlabs.com/puppetlabs-release-el-7.noarch.rpm