Sha256: 5a5b7a78010ee9ec867c04e56fa7a9849d4b00077bb2af74a118364b86c9d31c

Contents?: true

Size: 934 Bytes

Versions: 2

Compression:

Stored size: 934 Bytes

Contents

# frozen_string_literal: true

# takelage docker container login
module DockerContainerLogin
  # Backend method for docker container login.
  def docker_container_login
    log.debug 'Logging in to docker container'

    return false unless docker_check_daemon

    docker_socket_start

    return false unless _docker_container_lib_create_net_and_ctr @hostname

    mutagen_socket_create @mutagensock, @mutagensock

    run_and_exit _docker_container_login_enter_container @hostname
  end

  private

  # Prepare enter existing container command.
  def _docker_container_login_enter_container(container)
    log.debug "Entering container \"#{container}\""

    loginpoint = '/loginpoint.py'
    loginpoint = '/debug/loginpoint.py --debug ' if options[:debug]

    format(
      config.active['cmd_docker_container_enter_container'],
      container: container,
      loginpoint: loginpoint,
      username: @username
    )
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
takelage-0.28.11 lib/takelage/docker/container/login.rb
takelage-0.28.8 lib/takelage/docker/container/login.rb