class Deck::Container::Archive
Public Instance Methods
build_command(deps)
click to toggle source
# File lib/deck/container/archive.rb, line 20 def build_command(deps) cmd = "ADD #{attributes[:file]} #{attributes[:path]}\n" cmd += "RUN #{send attributes[:type]}" end
define(file, path: '/', type: :tar)
click to toggle source
# File lib/deck/container/archive.rb, line 8 def define(file, path: '/', type: :tar) step do attributes[:file] = file attributes[:path] = path attributes[:type] = type end end
export()
click to toggle source
# File lib/deck/container/archive.rb, line 16 def export attributes[:file] end
filename()
click to toggle source
# File lib/deck/container/archive.rb, line 37 def filename File.basename attributes[:file] end
tar()
click to toggle source
# File lib/deck/container/archive.rb, line 25 def tar "cd #{attributes[:path]} && tar xf #{filename}" end
tar_gz()
click to toggle source
# File lib/deck/container/archive.rb, line 29 def tar_gz "cd #{attributes[:path]} && tar zxf #{filename}" end
zip()
click to toggle source
# File lib/deck/container/archive.rb, line 33 def zip "cd #{attributes[:path]} && unzip #{filename}" end