Sha256: 3b41f1342b3817289772dabb79c3c9efabaea32bb0cd1edae4f4ed7f9168c77f

Contents?: true

Size: 542 Bytes

Versions: 53

Compression:

Stored size: 542 Bytes

Contents

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

    command_parts << "-d" if detached
    command_parts << Array(args).join(" ") if args
    command_parts << service
    command_parts << command if command
    
    if interactive
      shell.interactive!(command_parts.join(" "))
    else
      shell.exec!(command_parts.join(" "))
    end
  end
end

Version data entries

53 entries across 53 versions & 1 rubygems

Version Path
kuber_kit-0.8.2 lib/kuber_kit/shell/commands/docker_compose_commands.rb
kuber_kit-0.8.1 lib/kuber_kit/shell/commands/docker_compose_commands.rb
kuber_kit-0.8.0 lib/kuber_kit/shell/commands/docker_compose_commands.rb
kuber_kit-0.7.1 lib/kuber_kit/shell/commands/docker_compose_commands.rb
kuber_kit-0.7.0 lib/kuber_kit/shell/commands/docker_compose_commands.rb
kuber_kit-0.6.4 lib/kuber_kit/shell/commands/docker_compose_commands.rb
kuber_kit-0.6.3 lib/kuber_kit/shell/commands/docker_compose_commands.rb
kuber_kit-0.6.2 lib/kuber_kit/shell/commands/docker_compose_commands.rb
kuber_kit-0.6.1 lib/kuber_kit/shell/commands/docker_compose_commands.rb
kuber_kit-0.6.0 lib/kuber_kit/shell/commands/docker_compose_commands.rb
kuber_kit-0.5.10 lib/kuber_kit/shell/commands/docker_compose_commands.rb
kuber_kit-0.5.9 lib/kuber_kit/shell/commands/docker_compose_commands.rb
kuber_kit-0.5.8 lib/kuber_kit/shell/commands/docker_compose_commands.rb
kuber_kit-0.5.7 lib/kuber_kit/shell/commands/docker_compose_commands.rb
kuber_kit-0.5.6 lib/kuber_kit/shell/commands/docker_compose_commands.rb
kuber_kit-0.5.5 lib/kuber_kit/shell/commands/docker_compose_commands.rb
kuber_kit-0.5.4 lib/kuber_kit/shell/commands/docker_compose_commands.rb
kuber_kit-0.5.3 lib/kuber_kit/shell/commands/docker_compose_commands.rb
kuber_kit-0.5.2 lib/kuber_kit/shell/commands/docker_compose_commands.rb
kuber_kit-0.5.1 lib/kuber_kit/shell/commands/docker_compose_commands.rb