Class: GrokCLI::Docker::Run
- Inherits:
-
Object
- Object
- GrokCLI::Docker::Run
- Defined in:
- lib/grok_cli/docker/run.rb
Instance Method Summary collapse
- #execute(command) ⇒ Object
-
#initialize(config = Configuration.new) ⇒ Run
constructor
A new instance of Run.
Constructor Details
#initialize(config = Configuration.new) ⇒ Run
Returns a new instance of Run.
3 4 5 |
# File 'lib/grok_cli/docker/run.rb', line 3 def initialize(config = Configuration.new) @config = config end |
Instance Method Details
#execute(command) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/grok_cli/docker/run.rb', line 7 def execute(command) Boot.new.execute UpdateEtcHosts.new.execute system "\n eval \"$(docker-machine env \#{@config.machine_name})\"\n\n docker-compose run --rm web \#{command}\n\n CMD\nend\n" |