module Docker

Attributes

host[RW]

Public Class Methods

run_command(command) click to toggle source
# File lib/docker.rb, line 17
def run_command(command)
  result = system(command)
  raise StandardError.new('command failed to run. do you have docker installed?') if result.nil?
end
run_docker_command(subcommand, opts) click to toggle source
# File lib/docker.rb, line 8
def run_docker_command(subcommand, opts)
  c = "docker "
  c += "-H #{host} " if host
  c += subcommand + ' '
  c += opts

  run_command(c)
end