Class: GrokCLI::Docker::Start

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

Instance Method Summary collapse

Constructor Details

#initialize(config = Configuration.new) ⇒ Start

Returns a new instance of Start.



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

def initialize(config = Configuration.new)
  @config = config
end

Instance Method Details

#executeObject



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

def execute
  Boot.new.execute
  UpdateEtcHosts.new.execute

  system <<~CMD

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

    docker-compose run --service-ports --rm web

  CMD
end