Sha256: 59fb53b41de17c13fb1da2fef3b89ce485a6ee9b828674ec4e21914cc6daaa4b

Contents?: true

Size: 518 Bytes

Versions: 3

Compression:

Stored size: 518 Bytes

Contents

require 'vx/lib/shell'

module Vx ; module Lib ; module Container ;

  class Docker

    Spawner = Struct.new(:container, :ssh) do

      include Lib::Shell
      include Lib::Container::Upload

      def exec(script, options = {}, &logger)
        sh(:ssh, ssh).exec upload(script, "~/build.sh", mode: '0755', &logger), options
        sh(:ssh, ssh).exec("~/build.sh", options, &logger)
      end

      def work_dir
        "~/"
      end

      def id
        container.id
      end

    end
  end

end ; end ; end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
vx-lib-container-0.5.11 lib/vx/lib/container/docker/spawner.rb
vx-lib-container-0.5.10 lib/vx/lib/container/docker/spawner.rb
vx-lib-container-0.5.9 lib/vx/lib/container/docker/spawner.rb