Class: OmniAI::Tools::Docker::ComposeRunTool
- Defined in:
- lib/omniai/tools/docker/compose_run_tool.rb
Overview
Instance Method Summary collapse
Methods inherited from BaseTool
Constructor Details
This class inherits a constructor from OmniAI::Tools::Docker::BaseTool
Instance Method Details
#execute(command:, service: "app", args: []) ⇒ String
24 25 26 27 28 29 30 31 32 33 |
# File 'lib/omniai/tools/docker/compose_run_tool.rb', line 24 def execute(command:, service: "app", args: []) @logger.info(%(#{self.class.name}#execute service="#{service}" command="#{command}" args=#{args.inspect})) Dir.chdir(@root) do capture!("docker", "compose", "run", "--build", "--rm", service, command, *args) rescue CaptureError => e @logger.info("ERROR: #{e.}") return "ERROR: #{e.}" end end |