Sha256: d4280b92a46ff9ed5992dabecf79f83e8c61deb74fa445fcf3e5f4267ef9d413
Contents?: true
Size: 659 Bytes
Versions: 13
Compression:
Stored size: 659 Bytes
Contents
module Vx module ContainerConnector class Docker class Spawner attr_reader :container, :ssh, :work_dir def initialize(container, ssh, work_dir) @container = container @ssh = ssh @work_dir = work_dir end def spawn(*args, &logger) env = args.first.is_a?(Hash) ? args.shift : {} options = args.last.is_a?(Hash) ? args.pop : {} cmd = args options.merge!(chdir: work_dir, pty: true) ssh.spawn(env, cmd, options, &logger) end def id container.id end end end end end
Version data entries
13 entries across 13 versions & 1 rubygems