Sha256: 1dd4c492d1658aad8952f1c2818576579a4fee826456fad8cec8138120d01ceb

Contents?: true

Size: 998 Bytes

Versions: 40

Compression:

Stored size: 998 Bytes

Contents

# frozen_string_literal: true

# tau docker container command
module DockerContainerCommand
  # Backend method for docker container command.
  def docker_container_command(command)
    log.debug 'Running command in container'

    return false unless docker_check_daemon

    # no matrjoschka test here

    unless docker_container_check_existing @hostname
      return false unless _docker_container_lib_create_net_and_ctr @hostname

      _docker_container_lib_start_sockets
    end

    _docker_container_command_run_command @hostname, command
  end

  private

  # Prepare run command in container command.
  def _docker_container_command_run_command(container, command)
    log.debug "Running command \"#{command}\" in container \"#{container}\""

    cmd_docker_run_command =
      format(
        config.active['cmd_docker_container_docker_exec'],
        container: container,
        username: @username,
        command: command
      )

    run_and_exit cmd_docker_run_command
  end
end

Version data entries

40 entries across 40 versions & 1 rubygems

Version Path
takeltau-0.43.6 lib/takeltau/docker/container/command.rb
takeltau-0.43.4 lib/takeltau/docker/container/command.rb
takeltau-0.43.2 lib/takeltau/docker/container/command.rb
takeltau-0.43.1 lib/takeltau/docker/container/command.rb
takeltau-0.42.7 lib/takeltau/docker/container/command.rb
takeltau-0.42.5 lib/takeltau/docker/container/command.rb
takeltau-0.42.4 lib/takeltau/docker/container/command.rb
takeltau-0.42.3 lib/takeltau/docker/container/command.rb
takeltau-0.42.0 lib/takeltau/docker/container/command.rb
takeltau-0.41.10 lib/takeltau/docker/container/command.rb
takeltau-0.41.9 lib/takeltau/docker/container/command.rb
takeltau-0.41.0 lib/takeltau/docker/container/command.rb
takeltau-0.40.11 lib/takeltau/docker/container/command.rb
takeltau-0.40.9 lib/takeltau/docker/container/command.rb
takeltau-0.40.7 lib/takeltau/docker/container/command.rb
takeltau-0.40.6 lib/takeltau/docker/container/command.rb
takeltau-0.40.4 lib/takeltau/docker/container/command.rb
takeltau-0.40.3 lib/takeltau/docker/container/command.rb
takeltau-0.40.1 lib/takeltau/docker/container/command.rb
takeltau-0.40.0 lib/takeltau/docker/container/command.rb