Sha256: 60a0058e18ca65ba08622aab3e9acc4d87ff6ff0fe14a631c3a2d4987410b7db

Contents?: true

Size: 573 Bytes

Versions: 4

Compression:

Stored size: 573 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

      def properties
        container.json
      end

    end
  end

end ; end ; end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
vx-lib-container-0.6.3 lib/vx/lib/container/docker/spawner.rb
vx-lib-container-0.6.2 lib/vx/lib/container/docker/spawner.rb
vx-lib-container-0.6.1 lib/vx/lib/container/docker/spawner.rb
vx-lib-container-0.6.0 lib/vx/lib/container/docker/spawner.rb