Module: Docker
- Defined in:
- lib/docker.rb,
lib/commands/run.rb
Defined Under Namespace
Modules: Run
Class Attribute Summary collapse
-
.host ⇒ Object
Returns the value of attribute host.
Class Method Summary collapse
Class Attribute Details
.host ⇒ Object
Returns the value of attribute host.
6 7 8 |
# File 'lib/docker.rb', line 6 def host @host end |
Class Method Details
.run_command(command) ⇒ Object
17 18 19 20 |
# 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) ⇒ Object
8 9 10 11 12 13 14 15 |
# 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 |