Class: Dru::Commands::Up
- Inherits:
-
Dru::Command
- Object
- Dru::Command
- Dru::Commands::Up
- Defined in:
- lib/dru/commands/up.rb
Constant Summary collapse
- DOCKER_ATTACH_COMMAND =
'docker attach --detach-keys="ctrl-d"'.freeze
Constants inherited from Dru::Command
Dru::Command::DOCKER_COMPOSE_COMMAND
Instance Attribute Summary
Attributes inherited from Dru::Command
Instance Method Summary collapse
- #execute(input: $stdin, output: $stdout) ⇒ Object
-
#initialize(options:) ⇒ Up
constructor
A new instance of Up.
Methods inherited from Dru::Command
#command, #container_name_to_id, #cursor, #default_docker_compose, #docker_compose_paths, #editor, #environment, #environment_docker_compose, #exec_exist?, #generator, #pager, #platform, #project_configuration_path, #project_name, #prompt, #run_docker_compose_command, #screen, #which
Constructor Details
#initialize(options:) ⇒ Up
10 11 12 |
# File 'lib/dru/commands/up.rb', line 10 def initialize(options:) = end |
Instance Method Details
#execute(input: $stdin, output: $stdout) ⇒ Object
14 15 16 17 18 19 |
# File 'lib/dru/commands/up.rb', line 14 def execute(input: $stdin, output: $stdout) start_docker_compose return if [:detach] stop_docker_compose if attach_to_default_container end |