{"action":"created","issue":{"url":"https://api.github.com/repos/docker/docker/issues/21798","repository_url":"https://api.github.com/repos/docker/docker","labels_url":"https://api.github.com/repos/docker/docker/issues/21798/labels{/name}","comments_url":"https://api.github.com/repos/docker/docker/issues/21798/comments","events_url":"https://api.github.com/repos/docker/docker/issues/21798/events","html_url":"https://github.com/docker/docker/issues/21798","id":146319462,"number":21798,"title":"Docker Container Connected to Multiple Bridge Networks is not Accessible Externally","user":{"login":"JosephEarl","id":2513147,"avatar_url":"https://avatars.githubusercontent.com/u/2513147?v=3","gravatar_id":"","url":"https://api.github.com/users/JosephEarl","html_url":"https://github.com/JosephEarl","followers_url":"https://api.github.com/users/JosephEarl/followers","following_url":"https://api.github.com/users/JosephEarl/following{/other_user}","gists_url":"https://api.github.com/users/JosephEarl/gists{/gist_id}","starred_url":"https://api.github.com/users/JosephEarl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JosephEarl/subscriptions","organizations_url":"https://api.github.com/users/JosephEarl/orgs","repos_url":"https://api.github.com/users/JosephEarl/repos","events_url":"https://api.github.com/users/JosephEarl/events{/privacy}","received_events_url":"https://api.github.com/users/JosephEarl/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-04-06T13:48:19Z","updated_at":"2016-04-21T13:43:48Z","closed_at":null,"body":"**Output of `docker version`:**\r\n\r\n```\r\nClient:\r\n Version:      1.10.3\r\n API version:  1.22\r\n Go version:   go1.5.3\r\n Git commit:   20f81dd\r\n Built:        Thu Mar 10 15:39:25 2016\r\n OS/Arch:      linux/amd64\r\n\r\nServer:\r\n Version:      1.10.3\r\n API version:  1.22\r\n Go version:   go1.5.3\r\n Git commit:   20f81dd\r\n Built:        Thu Mar 10 15:39:25 2016\r\n OS/Arch:      linux/amd64\r\n```\r\n\r\n\r\n**Output of `docker info`:**\r\n\r\n```\r\nContainers: 15\r\n Running: 14\r\n Paused: 0\r\n Stopped: 1\r\nImages: 16\r\nServer Version: 1.10.3\r\nStorage Driver: devicemapper\r\n Pool Name: docker-202:1-25804197-pool\r\n Pool Blocksize: 65.54 kB\r\n Base Device Size: 107.4 GB\r\n Backing Filesystem: ext4\r\n Data file: /dev/loop0\r\n Metadata file: /dev/loop1\r\n Data Space Used: 7.609 GB\r\n Data Space Total: 107.4 GB\r\n Data Space Available: 7.427 GB\r\n Metadata Space Used: 13.59 MB\r\n Metadata Space Total: 2.147 GB\r\n Metadata Space Available: 2.134 GB\r\n Udev Sync Supported: true\r\n Deferred Removal Enabled: false\r\n Deferred Deletion Enabled: false\r\n Deferred Deleted Device Count: 0\r\n Data loop file: /var/lib/docker/devicemapper/devicemapper/data\r\n WARNING: Usage of loopback devices is strongly discouraged for production use. Either use `--storage-opt dm.thinpooldev` or use `--storage-opt dm.no_warn_on_loop_devices=true` to suppress this warning.\r\n Metadata loop file: /var/lib/docker/devicemapper/devicemapper/metadata\r\n Library Version: 1.02.107-RHEL7 (2015-12-01)\r\nExecution Driver: native-0.2\r\nLogging Driver: json-file\r\nPlugins: \r\n Volume: local\r\n Network: null host bridge\r\nKernel Version: 3.10.0-327.10.1.el7.x86_64\r\nOperating System: CentOS Linux 7 (Core)\r\nOSType: linux\r\nArchitecture: x86_64\r\nCPUs: 2\r\nTotal Memory: 7.389 GiB\r\nName: ip-172-31-30-202.eu-central-1.compute.internal\r\nID: G4GR:O5ZR:LJTX:USGA:EUG3:5CXK:RSAY:VCOX:QFRY:XPLS:A62C:VJ7Q\r\nWARNING: bridge-nf-call-iptables is disabled\r\nWARNING: bridge-nf-call-ip6tables is disabled\r\nLabels:\r\n provider=amazonec2\r\n```\r\n\r\n**Additional environment details (AWS, VirtualBox, physical, etc.):**\r\n\r\nAWS.\r\n\r\n**Steps to reproduce the issue:**\r\n1. Create a compose file with 2 containers, and 3 networks\r\n2. Connect container 1 to only 1 network and expose a port\r\n3. Connect container 2 to all 3 networks and expose a port\r\n\r\n**Describe the results you received:**\r\n\r\nContainer 1 is accessible externally. Container 2 is not.\r\nIf I SSH onto the AWS machine then I am able to access container 2 on the exposed port, but not externally. I have verified AWS networking rules.\r\n\r\n**Describe the results you expected:**\r\n\r\nBoth containers are accessible. The number of Docker networks connected to should not affect exposing ports.\r\n\r\n**Additional information you deem important (e.g. issue happens only occasionally):**\r\n\r\nIf you change container 2 to only connect to 1 network, then it is accessible externally.\r\n\r\nCompose file example:\r\n\r\n```\r\nversion: '2'\r\nservices:\r\n  service-a:\r\n    ports:\r\n      - \"8091:8091\"\r\n    networks:\r\n      - network-a\r\n  service-b:\r\n    ports:\r\n      - \"8092:8092\"\r\n    networks:\r\n      - network-a\r\n      - network-b\r\n      - network-c\r\nnetworks:\r\n  network-a:\r\n  network-b:\r\n  network-c:\r\n```"},"comment":{"url":"https://api.github.com/repos/docker/docker/issues/comments/212924973","html_url":"https://github.com/docker/docker/issues/21798#issuecomment-212924973","issue_url":"https://api.github.com/repos/docker/docker/issues/21798","id":212924973,"user":{"login":"cpuguy83","id":799078,"avatar_url":"https://avatars.githubusercontent.com/u/799078?v=3","gravatar_id":"","url":"https://api.github.com/users/cpuguy83","html_url":"https://github.com/cpuguy83","followers_url":"https://api.github.com/users/cpuguy83/followers","following_url":"https://api.github.com/users/cpuguy83/following{/other_user}","gists_url":"https://api.github.com/users/cpuguy83/gists{/gist_id}","starred_url":"https://api.github.com/users/cpuguy83/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cpuguy83/subscriptions","organizations_url":"https://api.github.com/users/cpuguy83/orgs","repos_url":"https://api.github.com/users/cpuguy83/repos","events_url":"https://api.github.com/users/cpuguy83/events{/privacy}","received_events_url":"https://api.github.com/users/cpuguy83/received_events","type":"User","site_admin":false},"created_at":"2016-04-21T13:43:47Z","updated_at":"2016-04-21T13:43:47Z","body":"ping @aboch "}}