Module: RatDeployer::Commands::Docker

Extended by:
RatDeployer::Command
Defined in:
lib/rat_deployer/commands/docker.rb

Overview

This command proxies to the docker binary adding remote flags if configuration for remote machine is present

Defined Under Namespace

Modules: Extension

Class Method Summary collapse

Methods included from RatDeployer::Command

colorize_warning, do_run, put_error, put_heading, put_warning, run

Class Method Details

.perform(cmd, *cmd_flags) ⇒ Object



14
15
16
17
18
19
# File 'lib/rat_deployer/commands/docker.rb', line 14

def self.perform(cmd, *cmd_flags)
  flags = []
  flags.unshift(Config.remote_machine_flags) if Config.remote
  cmd = run "docker #{flags.join(' ')} #{cmd} #{cmd_flags.join(' ')}"
  cmd.fetch(:output)
end