{"action":"created","issue":{"url":"https://api.github.com/repos/docker/docker-py/issues/986","repository_url":"https://api.github.com/repos/docker/docker-py","labels_url":"https://api.github.com/repos/docker/docker-py/issues/986/labels{/name}","comments_url":"https://api.github.com/repos/docker/docker-py/issues/986/comments","events_url":"https://api.github.com/repos/docker/docker-py/issues/986/events","html_url":"https://github.com/docker/docker-py/issues/986","id":140239892,"number":986,"title":"default NetworkMode should be \"bridge\", not \"default\"","user":{"login":"tbsf","id":12821762,"avatar_url":"https://avatars.githubusercontent.com/u/12821762?v=3","gravatar_id":"","url":"https://api.github.com/users/tbsf","html_url":"https://github.com/tbsf","followers_url":"https://api.github.com/users/tbsf/followers","following_url":"https://api.github.com/users/tbsf/following{/other_user}","gists_url":"https://api.github.com/users/tbsf/gists{/gist_id}","starred_url":"https://api.github.com/users/tbsf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tbsf/subscriptions","organizations_url":"https://api.github.com/users/tbsf/orgs","repos_url":"https://api.github.com/users/tbsf/repos","events_url":"https://api.github.com/users/tbsf/events{/privacy}","received_events_url":"https://api.github.com/users/tbsf/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-03-11T17:12:30Z","updated_at":"2016-03-11T21:15:04Z","closed_at":null,"body":"https://github.com/docker/docker-py/blob/master/docker/utils/utils.py#L646\r\n \r\n```python\r\n if network_mode:\r\n        host_config['NetworkMode'] = network_mode\r\n    elif network_mode is None and compare_version('1.19', version) > 0:\r\n        host_config['NetworkMode'] = 'default'\r\n```\r\n  \r\nshould be:\r\n\r\n```python\r\n  if network_mode:\r\n        host_config['NetworkMode'] = network_mode\r\n    elif network_mode is None and compare_version('1.19', version) > 0:\r\n        host_config['NetworkMode'] = 'bridge'\r\n```\r\n \r\nThe value of \"default\" gives an error like the following:\r\n\r\n```\r\nFAILED! => {\"changed\": true, \"failed\": true, \"msg\": \"Docker API Error: Cannot start container 400145f2e47c2f686abf1513d9d0c49b1fce1e6c8c9f2303c24c61085d5b094c: invalid network mode: default\"}\r\n```\r\n\r\nRunning on Mac OS 10.11.3\r\n\r\n```\r\nansible --version\r\nansible 2.0.1.0\r\n  config file = /etc/ansible/ansible.cfg\r\n  configured module search path = Default w/o overrides\r\n```\r\nHost is \r\nUbuntu 15.10\r\n\r\n```docker-py==1.7.2\r\nPython 2.7.10\r\nClient version: 1.6.2\r\nClient API version: 1.18\r\nGo version (client): go1.5.1\r\nGit commit (client): 7c8fca2\r\nOS/Arch (client): linux/amd64\r\nServer version: 1.6.2\r\nServer API version: 1.18\r\nGo version (server): go1.5.1\r\nGit commit (server): 7c8fca2\r\nOS/Arch (server): linux/amd64\r\n```"},"comment":{"url":"https://api.github.com/repos/docker/docker-py/issues/comments/195556303","html_url":"https://github.com/docker/docker-py/issues/986#issuecomment-195556303","issue_url":"https://api.github.com/repos/docker/docker-py/issues/986","id":195556303,"user":{"login":"tbsf","id":12821762,"avatar_url":"https://avatars.githubusercontent.com/u/12821762?v=3","gravatar_id":"","url":"https://api.github.com/users/tbsf","html_url":"https://github.com/tbsf","followers_url":"https://api.github.com/users/tbsf/followers","following_url":"https://api.github.com/users/tbsf/following{/other_user}","gists_url":"https://api.github.com/users/tbsf/gists{/gist_id}","starred_url":"https://api.github.com/users/tbsf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tbsf/subscriptions","organizations_url":"https://api.github.com/users/tbsf/orgs","repos_url":"https://api.github.com/users/tbsf/repos","events_url":"https://api.github.com/users/tbsf/events{/privacy}","received_events_url":"https://api.github.com/users/tbsf/received_events","type":"User","site_admin":false},"created_at":"2016-03-11T21:15:04Z","updated_at":"2016-03-11T21:15:04Z","body":"It looks like the 1.15 API introduces the NetworkMode option:\r\n\r\nhttps://docs.docker.com/engine/reference/api/docker_remote_api_v1.15/"}}