Sha256: 45fb8d67af376cd2a444741014862308ef8b255f774dea83c9473fd42abc6001

Contents?: true

Size: 1.13 KB

Versions: 39

Compression:

Stored size: 1.13 KB

Contents

# frozen_string_literal: true

# tau mutagen socket docker
module MutagenSocketDocker
  # Backend method for mutagen socket docker.
  def mutagen_socket_docker(hostsock)
    # See DockerContainerLib::_docker_container_lib_hostname
    socketname = "#{@hostname[-11..]}-docker"
    log.debug "Create the mutagen docker socket \"#{socketname}\" in the container " \
              "pointing to the host at \"#{hostsock}\""

    return false if mutagen_socket_check socketname

    socket_created = _mutagen_socket_docker_socket(socketname, hostsock)

    unless socket_created.include? 'Created session'
      log.debug "Unable to create mutagen docker socket \"#{socketname}\""
      return false
    end

    log.debug "Created the mutagen docker socket \"#{socketname}\""
    true
  end

  private

  # Get git branch.
  def _mutagen_socket_docker_socket(socketname, hostsock)
    cmd_create_socket = format(
      config.active['cmd_mutagen_forward_socket_docker'],
      socketname: socketname,
      hostsock: hostsock,
      container: @hostname,
      hostlabel: @hostlabel,
      takellabel: @takellabel
    )
    run cmd_create_socket
  end
end

Version data entries

39 entries across 39 versions & 1 rubygems

Version Path
takeltau-0.46.9 lib/takeltau/mutagen/socket/docker.rb
takeltau-0.46.8 lib/takeltau/mutagen/socket/docker.rb
takeltau-0.46.5 lib/takeltau/mutagen/socket/docker.rb
takeltau-0.46.1 lib/takeltau/mutagen/socket/docker.rb
takeltau-0.46.0 lib/takeltau/mutagen/socket/docker.rb
takeltau-0.45.27 lib/takeltau/mutagen/socket/docker.rb
takeltau-0.45.26 lib/takeltau/mutagen/socket/docker.rb
takeltau-0.45.24 lib/takeltau/mutagen/socket/docker.rb
takeltau-0.45.23 lib/takeltau/mutagen/socket/docker.rb
takeltau-0.45.22 lib/takeltau/mutagen/socket/docker.rb
takeltau-0.45.21 lib/takeltau/mutagen/socket/docker.rb
takeltau-0.45.19 lib/takeltau/mutagen/socket/docker.rb
takeltau-0.45.17 lib/takeltau/mutagen/socket/docker.rb
takeltau-0.45.16 lib/takeltau/mutagen/socket/docker.rb
takeltau-0.45.14 lib/takeltau/mutagen/socket/docker.rb
takeltau-0.45.13 lib/takeltau/mutagen/socket/docker.rb
takeltau-0.45.12 lib/takeltau/mutagen/socket/docker.rb
takeltau-0.45.11 lib/takeltau/mutagen/socket/docker.rb
takeltau-0.45.10 lib/takeltau/mutagen/socket/docker.rb
takeltau-0.45.9 lib/takeltau/mutagen/socket/docker.rb