{"action":"created","issue":{"url":"https://api.github.com/repos/docker/docker/issues/26705","repository_url":"https://api.github.com/repos/docker/docker","labels_url":"https://api.github.com/repos/docker/docker/issues/26705/labels{/name}","comments_url":"https://api.github.com/repos/docker/docker/issues/26705/comments","events_url":"https://api.github.com/repos/docker/docker/issues/26705/events","html_url":"https://github.com/docker/docker/issues/26705","id":177792713,"number":26705,"title":"Proposal: allow `docker attach` for non-running containers","user":{"login":"aanand","id":1062,"avatar_url":"https://avatars.githubusercontent.com/u/1062?v=3","gravatar_id":"","url":"https://api.github.com/users/aanand","html_url":"https://github.com/aanand","followers_url":"https://api.github.com/users/aanand/followers","following_url":"https://api.github.com/users/aanand/following{/other_user}","gists_url":"https://api.github.com/users/aanand/gists{/gist_id}","starred_url":"https://api.github.com/users/aanand/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aanand/subscriptions","organizations_url":"https://api.github.com/users/aanand/orgs","repos_url":"https://api.github.com/users/aanand/repos","events_url":"https://api.github.com/users/aanand/events{/privacy}","received_events_url":"https://api.github.com/users/aanand/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/docker/docker/labels/area/cli","name":"area/cli","color":"fbca04"},{"url":"https://api.github.com/repos/docker/docker/labels/kind/feature","name":"kind/feature","color":"AAB3AB"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-09-19T14:01:06Z","updated_at":"2016-09-20T11:18:32Z","closed_at":null,"body":"In Compose (specifically `docker-compose run`), instead of duplicating all of Docker's considerable client-side attach logic, we'd like to start [shelling out to `docker attach`](https://github.com/docker/compose/issues/3194#issuecomment-220292194) instead, so we have better parity across all platforms (especially Windows).\r\n\r\nHowever, there's currently [client-side code](https://github.com/docker/docker/blob/0640a14b4fcba3715f7cc3bc9444f3c7f4827edd/cli/command/container/attach.go#L56-L58) which prohibits a user from `docker attach`-ing to a non-running container. This is a showstopper: to avoid race conditions, the order of operations must be *create, attach, start*.\r\n\r\nI'd like to either remove this logic or add a flag to skip it."},"comment":{"url":"https://api.github.com/repos/docker/docker/issues/comments/248273091","html_url":"https://github.com/docker/docker/issues/26705#issuecomment-248273091","issue_url":"https://api.github.com/repos/docker/docker/issues/26705","id":248273091,"user":{"login":"aanand","id":1062,"avatar_url":"https://avatars.githubusercontent.com/u/1062?v=3","gravatar_id":"","url":"https://api.github.com/users/aanand","html_url":"https://github.com/aanand","followers_url":"https://api.github.com/users/aanand/followers","following_url":"https://api.github.com/users/aanand/following{/other_user}","gists_url":"https://api.github.com/users/aanand/gists{/gist_id}","starred_url":"https://api.github.com/users/aanand/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aanand/subscriptions","organizations_url":"https://api.github.com/users/aanand/orgs","repos_url":"https://api.github.com/users/aanand/repos","events_url":"https://api.github.com/users/aanand/events{/privacy}","received_events_url":"https://api.github.com/users/aanand/received_events","type":"User","site_admin":false},"created_at":"2016-09-20T11:18:32Z","updated_at":"2016-09-20T11:18:32Z","body":"@tonistiigi We can't use the Go API, because Compose is written in Python! Shelling out to `docker attach` is the only way I can see to re-use Engine's client-side attach code from Compose."}}
{"actor":{"display_login":"aanand"}}