Class: Dip::Commands::Nginx::Down

Inherits:
Dip::Command show all
Defined in:
lib/dip/commands/nginx.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.


41
42
43
# File 'lib/dip/commands/nginx.rb', line 41

def initialize(name:)
  @name = name
end

Instance Method Details

#executeObject


45
46
47
48
# File 'lib/dip/commands/nginx.rb', line 45

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