Sha256: 5fbf2876c3ca3f7f62b81190f9b9a4f5572244c3429afc029eeeb61d9d7511ac

Contents?: true

Size: 958 Bytes

Versions: 3

Compression:

Stored size: 958 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 if mutagen_check_daemon

    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

3 entries across 3 versions & 1 rubygems

Version Path
takelage-0.28.26 lib/takelage/docker/container/login.rb
takelage-0.28.24 lib/takelage/docker/container/login.rb
takelage-0.28.14 lib/takelage/docker/container/login.rb