Module: Docker::Util

Defined in:
lib/buncker/patches/docker.rb

Class Method Summary collapse

Class Method Details

.hijack_stdin_for(stdin) ⇒ Object

hijack only for stdin (to work with SSL sockets)



41
42
43
44
45
46
47
48
# File 'lib/buncker/patches/docker.rb', line 41

def hijack_stdin_for(stdin)
  lambda do |socket|
    debug "hijack_stdin: copying stdin => socket"
    IO.copy_stream stdin, socket
    debug "hijack_stdin: closing hijacked write socket"
    socket.close
  end
end