Sha256: ebfdc98272cba9f99a3fa60f560ea5b0fcf9e13f79a9f1279cec42d1e454b985
Contents?: true
Size: 608 Bytes
Versions: 6
Compression:
Stored size: 608 Bytes
Contents
# -*- coding: utf-8 -*- module Specinfra::Backend class Dockerfile < Specinfra::Backend::Base def initialize @lines = [] ObjectSpace.define_finalizer(self) { if get_config(:dockerfile_finalizer).nil? puts @lines else get_config(:dockerfile_finalizer).call(@lines) end } end def run_command(cmd, opts={}) @lines << "RUN #{cmd}" CommandResult.new end def send_file(from, to) @lines << "ADD #{from} #{to}" CommandResult.new end def from(base) @lines << "FROM #{base}" end end end
Version data entries
6 entries across 6 versions & 1 rubygems