{"action":"created","issue":{"url":"https://api.github.com/repos/docker/docker-py/issues/1691","repository_url":"https://api.github.com/repos/docker/docker-py","labels_url":"https://api.github.com/repos/docker/docker-py/issues/1691/labels{/name}","comments_url":"https://api.github.com/repos/docker/docker-py/issues/1691/comments","events_url":"https://api.github.com/repos/docker/docker-py/issues/1691/events","html_url":"https://github.com/docker/docker-py/issues/1691","id":245877943,"number":1691,"title":"Error trying to pass ip to container","user":{"login":"robertknox","id":11492485,"avatar_url":"https://avatars1.githubusercontent.com/u/11492485?v=4","gravatar_id":"","url":"https://api.github.com/users/robertknox","html_url":"https://github.com/robertknox","followers_url":"https://api.github.com/users/robertknox/followers","following_url":"https://api.github.com/users/robertknox/following{/other_user}","gists_url":"https://api.github.com/users/robertknox/gists{/gist_id}","starred_url":"https://api.github.com/users/robertknox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robertknox/subscriptions","organizations_url":"https://api.github.com/users/robertknox/orgs","repos_url":"https://api.github.com/users/robertknox/repos","events_url":"https://api.github.com/users/robertknox/events{/privacy}","received_events_url":"https://api.github.com/users/robertknox/received_events","type":"User","site_admin":false},"labels":[{"id":40793868,"url":"https://api.github.com/repos/docker/docker-py/labels/kind/question","name":"kind/question","color":"cc317c","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2017-07-26T22:53:26Z","updated_at":"2017-07-27T02:06:42Z","closed_at":null,"body":"I am trying to use docker-py to do pass in an ip to the container. This works fine from the command line:\r\n\r\n docker run -it --rm --net=br0 --entrypoint=\"/bin/sh\"  -v `pwd`/../src:/app  --cap-add=NET_ADMIN --ip=172.27.153.11 mbussim\r\n\r\nI order to do this from docker-py i gather I most first create a network config and then pass it in as an option?\r\n\r\nHowever when I try to create the networking config I get an error:\r\n\r\nnetworking_config = self.dockerAPIClient.create_networking_config({\r\n            'network1': self.dockerAPIClient.create_endpoint_config(\r\n                ipv4_address=ip\r\n            )\r\n        })\r\n\r\nreturns:\r\n\r\nTypeError: unbound method create_endpoint_config() must be called with APIClient instance as first argument (got nothing instead)\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/docker/docker-py/issues/comments/318237496","html_url":"https://github.com/docker/docker-py/issues/1691#issuecomment-318237496","issue_url":"https://api.github.com/repos/docker/docker-py/issues/1691","id":318237496,"user":{"login":"robertknox","id":11492485,"avatar_url":"https://avatars1.githubusercontent.com/u/11492485?v=4","gravatar_id":"","url":"https://api.github.com/users/robertknox","html_url":"https://github.com/robertknox","followers_url":"https://api.github.com/users/robertknox/followers","following_url":"https://api.github.com/users/robertknox/following{/other_user}","gists_url":"https://api.github.com/users/robertknox/gists{/gist_id}","starred_url":"https://api.github.com/users/robertknox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robertknox/subscriptions","organizations_url":"https://api.github.com/users/robertknox/orgs","repos_url":"https://api.github.com/users/robertknox/repos","events_url":"https://api.github.com/users/robertknox/events{/privacy}","received_events_url":"https://api.github.com/users/robertknox/received_events","type":"User","site_admin":false},"created_at":"2017-07-27T02:06:42Z","updated_at":"2017-07-27T02:06:42Z","body":"I tried this:\r\n\r\nand got:docker.errors.APIError: 500 Server Error: Internal Server Error (\"Container cannot be connected to multiple networks with one of the networks in private (none) mode\")\r\n\r\nThanks again for taking the time to respond.\r\n\r\n\r\n\r\n"}}
{"actor":{"display_login":"robertknox"}}