{"action":"opened","issue":{"url":"https://api.github.com/repos/apocas/dockerode/issues/479","repository_url":"https://api.github.com/repos/apocas/dockerode","labels_url":"https://api.github.com/repos/apocas/dockerode/issues/479/labels{/name}","comments_url":"https://api.github.com/repos/apocas/dockerode/issues/479/comments","events_url":"https://api.github.com/repos/apocas/dockerode/issues/479/events","html_url":"https://github.com/apocas/dockerode/issues/479","id":356312826,"node_id":"MDU6SXNzdWUzNTYzMTI4MjY=","number":479,"title":"demux stream does not work when attaching to stdin","user":{"login":"P4sca1","id":10992664,"node_id":"MDQ6VXNlcjEwOTkyNjY0","avatar_url":"https://avatars0.githubusercontent.com/u/10992664?v=4","gravatar_id":"","url":"https://api.github.com/users/P4sca1","html_url":"https://github.com/P4sca1","followers_url":"https://api.github.com/users/P4sca1/followers","following_url":"https://api.github.com/users/P4sca1/following{/other_user}","gists_url":"https://api.github.com/users/P4sca1/gists{/gist_id}","starred_url":"https://api.github.com/users/P4sca1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/P4sca1/subscriptions","organizations_url":"https://api.github.com/users/P4sca1/orgs","repos_url":"https://api.github.com/users/P4sca1/repos","events_url":"https://api.github.com/users/P4sca1/events{/privacy}","received_events_url":"https://api.github.com/users/P4sca1/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-09-02T20:48:12Z","updated_at":"2018-09-02T20:48:12Z","closed_at":null,"author_association":"NONE","body":"When attaching to a container with both `stdin`, `stdout` and `stderr`, it seems to be not possible to demux the stream using the following code:\r\n\r\n```\r\nconst containerStream = await container.attach({ \r\n\tstream: true, stdin: true, stdout: true, stderr: true\r\n})\r\n\r\nconst stdout = new stream.PassThrough()\r\nconst stderr = new stream.PassThrough()\r\ncontainer.modem.demuxStream(containerStream, stdout, stderr)\r\n\r\nstdout.on('data', chunk => {\r\n\t// never called\r\n})\r\n\r\nstderr.on('data', chunk => {\r\n\t// never called\r\n})\r\n\r\nthis.stream.on('data', chunk => {\r\n\t// data gets received\r\n})\r\n```"}}
{"actor":{"display_login":"P4sca1"}}