{"action":"created","issue":{"url":"https://api.github.com/repos/apocas/dockerode/issues/263","repository_url":"https://api.github.com/repos/apocas/dockerode","labels_url":"https://api.github.com/repos/apocas/dockerode/issues/263/labels{/name}","comments_url":"https://api.github.com/repos/apocas/dockerode/issues/263/comments","events_url":"https://api.github.com/repos/apocas/dockerode/issues/263/events","html_url":"https://github.com/apocas/dockerode/issues/263","id":163824595,"number":263,"title":"Unable to run exec in a docker container","user":{"login":"jayantbh","id":7949047,"avatar_url":"https://avatars.githubusercontent.com/u/7949047?v=3","gravatar_id":"","url":"https://api.github.com/users/jayantbh","html_url":"https://github.com/jayantbh","followers_url":"https://api.github.com/users/jayantbh/followers","following_url":"https://api.github.com/users/jayantbh/following{/other_user}","gists_url":"https://api.github.com/users/jayantbh/gists{/gist_id}","starred_url":"https://api.github.com/users/jayantbh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jayantbh/subscriptions","organizations_url":"https://api.github.com/users/jayantbh/orgs","repos_url":"https://api.github.com/users/jayantbh/repos","events_url":"https://api.github.com/users/jayantbh/events{/privacy}","received_events_url":"https://api.github.com/users/jayantbh/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-07-05T11:00:05Z","updated_at":"2016-07-06T04:18:29Z","closed_at":null,"body":"I'm unable to run exec in a docker container.\r\n\r\nIt keeps throwing this:\r\n`\u0002/open /proc/6/status: no such file or directory`\r\n\r\nEven your example [here](https://github.com/apocas/dockerode/blob/master/examples/exec_running_container.js) throws the same error.\r\n\r\nThis is my code:\r\n\r\n```javascript\r\nvar docker = new Docker();\r\n\r\nvar username = \"test_user\";\r\nvar container;\r\nvar containerId;\r\n\r\nif (storage.getItem(username)) {\r\n    containerId = storage.getItem(username);\r\n    container = docker.getContainer(containerId);\r\n    // console.log(container);\r\n    containerHandler(container);\r\n}\r\nelse {\r\n    docker.createContainer({Image: 'ubuntu', Cmd: ['/bin/bash']}, function (err, container) {\r\n        storage.setItem(username, container.id);\r\n        containerHandler(container);\r\n    });\r\n}\r\n\r\nfunction containerHandler(container) {\r\n    container.start(function (err, data) {\r\n        console.log(\"Started: \", data);\r\n        command(container, \"ls\");\r\n    });\r\n}\r\n\r\nfunction command(container, cmd) {\r\n    var options = {\r\n        'AttachStdout': true,\r\n        'AttachStderr': true,\r\n        'Tty': false,\r\n        Cmd: [\"bash\", \"-c\", \"ls\"]\r\n    };\r\n    container.exec(options, function (err, exec) {\r\n        if (err) return;\r\n\r\n        var attach_opts = {'Detach': false, 'Tty': false, stream: true, stdin: true, stdout: true, stderr: true};\r\n        exec.start(attach_opts, function (err, stream) {\r\n            if (err) return;\r\n\r\n            stream.setEncoding('utf8');\r\n            stream.pipe(process.stdout);\r\n        });\r\n    });\r\n}\r\n```\r\n\r\nWhat am I doing wrong? ;_;"},"comment":{"url":"https://api.github.com/repos/apocas/dockerode/issues/comments/230667469","html_url":"https://github.com/apocas/dockerode/issues/263#issuecomment-230667469","issue_url":"https://api.github.com/repos/apocas/dockerode/issues/263","id":230667469,"user":{"login":"apocas","id":597413,"avatar_url":"https://avatars.githubusercontent.com/u/597413?v=3","gravatar_id":"","url":"https://api.github.com/users/apocas","html_url":"https://github.com/apocas","followers_url":"https://api.github.com/users/apocas/followers","following_url":"https://api.github.com/users/apocas/following{/other_user}","gists_url":"https://api.github.com/users/apocas/gists{/gist_id}","starred_url":"https://api.github.com/users/apocas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apocas/subscriptions","organizations_url":"https://api.github.com/users/apocas/orgs","repos_url":"https://api.github.com/users/apocas/repos","events_url":"https://api.github.com/users/apocas/events{/privacy}","received_events_url":"https://api.github.com/users/apocas/received_events","type":"User","site_admin":false},"created_at":"2016-07-06T04:18:29Z","updated_at":"2016-07-06T04:18:29Z","body":"Humm.\r\n\r\nWhat Docker version are you using?\r\nCould you please do a npm test in your system?\r\n\r\nhttps://github.com/apocas/dockerode/blob/master/test/container.js#L546 - check this test\r\n"}}
{"actor":{"display_login":"apocas"}}