Module: DockerCore::Base::Command::ClassMethod

Defined in:
lib/docker_core.rb

Instance Method Summary collapse

Instance Method Details

#capture_command(*arguments, environment: {}, bind: {}, throw: false, wait: 0, strip: true, echo: false) ⇒ Object

Parameters:

  • arguments (Array)
  • throw (Boolean) (defaults to: false)
  • wait (Numeric) (defaults to: 0)
  • strip (Boolean) (defaults to: true)
  • echo (Boolean) (defaults to: false)


35
36
37
38
# File 'lib/docker_core.rb', line 35

def capture_command(*arguments, environment: {}, bind: {}, throw: false, wait: 0, strip: true, echo: false)
  bind[Dir.pwd] = self.work_folder
  Swarm.capture_command(self.from_image, *arguments, environment: environment, bind: bind, throw: throw, wait: wait, strip: strip, echo: echo)
end

#from_imageString

Returns:

  • (String)


21
22
23
# File 'lib/docker_core.rb', line 21

def from_image
  Error.no_method(__method__)
end

#run_command(*arguments, environment: {}, bind: {}, throw: true, wait: 0, echo: true) ⇒ Object

Parameters:

  • arguments (Array)
  • throw (Boolean) (defaults to: true)
  • wait (Numeric) (defaults to: 0)
  • echo (Boolean) (defaults to: true)


44
45
46
47
# File 'lib/docker_core.rb', line 44

def run_command(*arguments, environment: {}, bind: {}, throw: true, wait: 0, echo: true)
  bind[Dir.pwd] = self.work_folder
  Swarm.run_command(self.from_image, *arguments, environment: environment, bind: bind, throw: throw, wait: wait, echo: echo)
end

#work_folderString

Returns:

  • (String)


26
27
28
# File 'lib/docker_core.rb', line 26

def work_folder
  Error.no_method(__method__)
end