class Pkgman::Targets::Centos
Attributes
container[R]
Public Class Methods
new(runtime, target)
click to toggle source
# File lib/pkgman/targets/centos.rb, line 7 def initialize(runtime, target) @runtime = runtime @target = target @container = runtime.container(target['image'], target['version']) self.update self.install('gcc', 'bzip2', 'make', 'rpm-build', 'rubygems', 'ruby-devel', 'ruby-json') @container.execute('gem install --no-document fpm') self.install(*target['requires']) @container.execute('mkdir -p /tmp/compiled') @container.execute('mkdir -p /tmp/src') @container.execute('mkdir -p /tmp/product') end
Public Instance Methods
install(*packages)
click to toggle source
# File lib/pkgman/targets/centos.rb, line 29 def install(*packages) pkgs = packages.join(' ') @container.execute("yum install -y --setopt=tsflags=nodocs #{pkgs}") end
update()
click to toggle source
# File lib/pkgman/targets/centos.rb, line 25 def update @container.execute('yum update -y --setopt=tsflags=nodocs') end