module Conjur::Debify::Utils

Public Instance Methods

copy_from_container(container, path) click to toggle source

copy a file from container to the current working directory

# File lib/conjur/debify/utils.rb, line 7
def copy_from_container container, path
  tar = StringIO.new
  container.archive_out(path) { |chunk| tar.write chunk }
  tar.rewind
  Gem::Package::TarReader.new(tar).each do |entry|
    File.write entry.full_name, entry.read
  end
end