Sha256: 718cee022f474f4a3351e8203f1af04064c5174d7044997389922e1e0e9d6877

Contents?: true

Size: 479 Bytes

Versions: 1

Compression:

Stored size: 479 Bytes

Contents

class KuberKit::Shell::Commands::DockerComposeCommands
  def run(shell, path, service:, command:, interactive: false, detached: false)
    command_parts = [
      "docker-compose",
      "-f #{path}",
      "run",
    ]
    
    if detached
      command_parts << "-d"
    end

    command_parts << service
    command_parts << command
    
    if interactive
      shell.interactive!(command_parts.join(" "))
    else
      shell.exec!(command_parts.join(" "))
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
kuber_kit-0.3.8 lib/kuber_kit/shell/commands/docker_compose_commands.rb