Class: GrokCLI::Docker::WordPress::Destroy

Inherits:
Object
  • Object
show all
Defined in:
lib/grok_cli/docker/wordpress/destroy.rb

Instance Method Summary collapse

Constructor Details

#initialize(config = GrokCLI::Docker::Configuration.new) ⇒ Destroy

Returns a new instance of Destroy.



3
4
5
# File 'lib/grok_cli/docker/wordpress/destroy.rb', line 3

def initialize(config = GrokCLI::Docker::Configuration.new)
  @config = config
end

Instance Method Details

#executeObject



7
8
9
10
11
12
13
14
15
16
# File 'lib/grok_cli/docker/wordpress/destroy.rb', line 7

def execute
  system <<~CMD

    docker-machine create #{@config.machine_name} --driver virtualbox

    eval "$(docker-machine env #{@config.machine_name})"

    docker-compose down
  CMD
end