Class: Djin::Interpreter::DockerComposeCommandBuilder

Inherits:
BaseCommandBuilder show all
Defined in:
lib/djin/interpreter/docker_compose_command_builder.rb

Instance Method Summary collapse

Methods inherited from BaseCommandBuilder

call

Instance Method Details

#call(params, **_) ⇒ Object



6
7
8
9
10
11
12
13
14
# File 'lib/djin/interpreter/docker_compose_command_builder.rb', line 6

def call(params, **_)
  service = params['service']

  compose_options = params['options']

  run_command, run_options = build_run_params(params['run'])

  [%(docker-compose #{compose_options} run #{run_options} #{service} sh -c "#{run_command}").squeeze(' '), nil]
end