{"action":"created","issue":{"url":"https://api.github.com/repos/docker/docker-py/issues/596","labels_url":"https://api.github.com/repos/docker/docker-py/issues/596/labels{/name}","comments_url":"https://api.github.com/repos/docker/docker-py/issues/596/comments","events_url":"https://api.github.com/repos/docker/docker-py/issues/596/events","html_url":"https://github.com/docker/docker-py/issues/596","id":75443264,"number":596,"title":"Can't set --volumes-from when creating containers","user":{"login":"windworship","id":7194287,"avatar_url":"https://avatars.githubusercontent.com/u/7194287?v=3","gravatar_id":"","url":"https://api.github.com/users/windworship","html_url":"https://github.com/windworship","followers_url":"https://api.github.com/users/windworship/followers","following_url":"https://api.github.com/users/windworship/following{/other_user}","gists_url":"https://api.github.com/users/windworship/gists{/gist_id}","starred_url":"https://api.github.com/users/windworship/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/windworship/subscriptions","organizations_url":"https://api.github.com/users/windworship/orgs","repos_url":"https://api.github.com/users/windworship/repos","events_url":"https://api.github.com/users/windworship/events{/privacy}","received_events_url":"https://api.github.com/users/windworship/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-05-12T03:23:07Z","updated_at":"2015-05-12T20:35:24Z","closed_at":null,"body":"Guys, I got an Error when I try to set --volumes-from in create_container:\r\n\r\nError:'volumes_from' parameter has no effect on create_container(). It has been moved to start()\r\n\r\nHowever, setting volumes-from in start() rather than create_container() means swarm can't **automatically generate affinities**. So we actually create the container on some node without the volumes-from container, which results in an Error:\r\n\r\n 406 Client Error: Not Acceptable (\"Cannot start container : container <> not found, impossible to mount its volumes\")\r\n\r\nI know this could be fixed by adding affinity in create_container(), but I don't see the point why we can't set --volumes-from in create_container, especially after I found --volumes-from is acceptable on creating containers on Docker remote API. "},"comment":{"url":"https://api.github.com/repos/docker/docker-py/issues/comments/101412260","html_url":"https://github.com/docker/docker-py/issues/596#issuecomment-101412260","issue_url":"https://api.github.com/repos/docker/docker-py/issues/596","id":101412260,"user":{"login":"shin-","id":1086876,"avatar_url":"https://avatars.githubusercontent.com/u/1086876?v=3","gravatar_id":"","url":"https://api.github.com/users/shin-","html_url":"https://github.com/shin-","followers_url":"https://api.github.com/users/shin-/followers","following_url":"https://api.github.com/users/shin-/following{/other_user}","gists_url":"https://api.github.com/users/shin-/gists{/gist_id}","starred_url":"https://api.github.com/users/shin-/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shin-/subscriptions","organizations_url":"https://api.github.com/users/shin-/orgs","repos_url":"https://api.github.com/users/shin-/repos","events_url":"https://api.github.com/users/shin-/events{/privacy}","received_events_url":"https://api.github.com/users/shin-/received_events","type":"User","site_admin":false},"created_at":"2015-05-12T20:35:24Z","updated_at":"2015-05-12T20:35:24Z","body":"Use [HostConfig](http://docker-py.readthedocs.org/en/1.2.2/hostconfig/)"}}