Class: Dip::Commands::Compose
- Inherits:
-
Dip::Command
- Object
- Dip::Command
- Dip::Commands::Compose
- Defined in:
- lib/dip/commands/compose.rb
Constant Summary collapse
- DOCKER_EMBEDDED_DNS =
"127.0.0.11"
Instance Attribute Summary collapse
-
#argv ⇒ Object
readonly
Returns the value of attribute argv.
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#shell ⇒ Object
readonly
Returns the value of attribute shell.
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(*argv, shell: true) ⇒ Compose
constructor
A new instance of Compose.
Methods inherited from Dip::Command
Constructor Details
Instance Attribute Details
#argv ⇒ Object (readonly)
Returns the value of attribute argv.
13 14 15 |
# File 'lib/dip/commands/compose.rb', line 13 def argv @argv end |
#config ⇒ Object (readonly)
Returns the value of attribute config.
13 14 15 |
# File 'lib/dip/commands/compose.rb', line 13 def config @config end |
#shell ⇒ Object (readonly)
Returns the value of attribute shell.
13 14 15 |
# File 'lib/dip/commands/compose.rb', line 13 def shell @shell end |
Instance Method Details
#execute ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/dip/commands/compose.rb', line 21 def execute Dip.env["DIP_DNS"] ||= find_dns set_infra_env compose_argv = Array(find_files) + Array() + argv if (override_command = compose_command_override) override_command, *override_args = override_command.split(" ") exec_program(override_command, override_args.concat(compose_argv), shell: shell) else exec_program("docker", compose_argv.unshift("compose"), shell: shell) end end |