lib/docker/resource/container.rb
def attach(container_id, options = {}, timeout = nil, &block)
    raise(ArgumentError, "Block must be given to handle streamed data") if block.nil?
    options = {stdout: true, stderr: true} if options.empty?
    options = options.merge(stream: true, logs: false)
    
    response = @connection.stream("/containers/#{container_id}/attach", options, timeout, {}, &block)
    raise_if_container_not_found(response.status)
    raise(BadParameterError) if response.status == 400
    response
  end
# Valid options:
# stdout  true  default is false
# stderr  true  default is false
Valid options:
stdout  true  default is false
stderr  true  default is false
Valid options : stdout true default is false stderr true default is false
def attach(container_id, options = {}, timeout = nil, &block)
    raise(ArgumentError, "Block must be given to handle streamed data") if block.nil?
    options = {stdout: true, stderr: true} if options.empty?
    options = options.merge(stream: true, logs: false)
    response = @connection.stream("/containers/#{container_id}/attach", options, timeout, {}, &block)
    raise_if_container_not_found(response.status)
    raise(BadParameterError) if response.status == 400
    response
  end
def attach ( container_id , options = { } , timeout = nil , & block ) raise ( ArgumentError , "Block must be given to handle streamed data" ) if block . nil? options = { stdout : true , stderr : true } if options . empty? options = options . merge ( stream : true , logs : false ) response = @connection . stream ( "/containers/#{container_id}/attach" , options , timeout , { } , & block ) raise_if_container_not_found ( response . status ) raise ( BadParameterError ) if response . status == 400 response end
Valid options:
stdout  true  default is false
stderr  true  default is false
Valid options : stdout true default is false stderr true default is false
container_id
options
timeout
block