Class: Dip::Commands::DNS::Down

Inherits:
Dip::Command show all
Defined in:
lib/dip/commands/dns.rb

Instance Method Summary collapse

Methods inherited from Dip::Command

exec_program, exec_subprocess

Constructor Details

#initialize(name:) ⇒ Down

Returns a new instance of Down.



38
39
40
# File 'lib/dip/commands/dns.rb', line 38

def initialize(name:)
  @name = name
end

Instance Method Details

#executeObject



42
43
44
45
# File 'lib/dip/commands/dns.rb', line 42

def execute
  exec_subprocess("docker", "stop #{@name}", panic: false, out: File::NULL, err: File::NULL)
  exec_subprocess("docker", "rm -v #{@name}", panic: false, out: File::NULL, err: File::NULL)
end