{"action":"opened","issue":{"url":"https://api.github.com/repos/docker/docker/issues/22070","repository_url":"https://api.github.com/repos/docker/docker","labels_url":"https://api.github.com/repos/docker/docker/issues/22070/labels{/name}","comments_url":"https://api.github.com/repos/docker/docker/issues/22070/comments","events_url":"https://api.github.com/repos/docker/docker/issues/22070/events","html_url":"https://github.com/docker/docker/issues/22070","id":148677378,"number":22070,"title":"Difference between AttachStdin and OpenStdin?","user":{"login":"Yoncise","id":4560467,"avatar_url":"https://avatars.githubusercontent.com/u/4560467?v=3","gravatar_id":"","url":"https://api.github.com/users/Yoncise","html_url":"https://github.com/Yoncise","followers_url":"https://api.github.com/users/Yoncise/followers","following_url":"https://api.github.com/users/Yoncise/following{/other_user}","gists_url":"https://api.github.com/users/Yoncise/gists{/gist_id}","starred_url":"https://api.github.com/users/Yoncise/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Yoncise/subscriptions","organizations_url":"https://api.github.com/users/Yoncise/orgs","repos_url":"https://api.github.com/users/Yoncise/repos","events_url":"https://api.github.com/users/Yoncise/events{/privacy}","received_events_url":"https://api.github.com/users/Yoncise/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-04-15T14:35:38Z","updated_at":"2016-04-15T14:35:38Z","closed_at":null,"body":"In normal case, `AttachStdin == OpenStdin`, however, we can set `AttashStdin == true` while `OpenStdin == false` by `-a stdin` (without `-i`). I can not figure out any circumstance where set `AttashStdin == true` while `OpenStdin == false` is useful, if not why not just set `AttachStdin = OpenStdin` in [parse.go](https://github.com/docker/docker/blob/07f580489908bf6a3373daac1473045406e1130d/runconfig/opts/parse.go#L138). I post a similar question in SO ([here](http://stackoverflow.com/questions/36563630/confuse-about-dockers-i-keep-stdin-open-even-if-not-attached))"}}