upserve / docker-api

A lightweight Ruby client for the Docker Remote API
MIT License
1.09k stars 287 forks source link

i can't take tty latest data #547

Closed monsterooo closed 4 years ago

monsterooo commented 5 years ago

This is my ruby of code:

require 'docker'

container = Docker::Container.get('ba8ef6fcdf01')
result = container.attach(:stream => true, :stdin => StringIO.new("console.log(' ->->-> 7 ~~')\n"), :stdout => true, :stderr => true, :logs => true, :tty => true)
p '-----------'
p result[0]
p '-----------'
p '>>>>> ', container.logs(stdout: true)

90074f9e-b566-405d-9479-b7f7b1672881

My question is container.logs(stdout: true) can't take latest tty data

Is there anyone willing to help me 😂