{"action":"created","issue":{"url":"https://api.github.com/repos/drone/drone-exec/issues/33","repository_url":"https://api.github.com/repos/drone/drone-exec","labels_url":"https://api.github.com/repos/drone/drone-exec/issues/33/labels{/name}","comments_url":"https://api.github.com/repos/drone/drone-exec/issues/33/comments","events_url":"https://api.github.com/repos/drone/drone-exec/issues/33/events","html_url":"https://github.com/drone/drone-exec/pull/33","id":147742569,"number":33,"title":"Support for user networks + docker v2 syntax.","user":{"login":"sylus","id":984304,"avatar_url":"https://avatars.githubusercontent.com/u/984304?v=3","gravatar_id":"","url":"https://api.github.com/users/sylus","html_url":"https://github.com/sylus","followers_url":"https://api.github.com/users/sylus/followers","following_url":"https://api.github.com/users/sylus/following{/other_user}","gists_url":"https://api.github.com/users/sylus/gists{/gist_id}","starred_url":"https://api.github.com/users/sylus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sylus/subscriptions","organizations_url":"https://api.github.com/users/sylus/orgs","repos_url":"https://api.github.com/users/sylus/repos","events_url":"https://api.github.com/users/sylus/events{/privacy}","received_events_url":"https://api.github.com/users/sylus/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2016-04-12T12:54:41Z","updated_at":"2016-04-14T17:19:19Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/drone/drone-exec/pulls/33","html_url":"https://github.com/drone/drone-exec/pull/33","diff_url":"https://github.com/drone/drone-exec/pull/33.diff","patch_url":"https://github.com/drone/drone-exec/pull/33.patch"},"body":"Drone does not work with Docker v2 syntax when using custom networks. Drone reverts to using the legacy network. However if any of the containers are needed by drone and in a custom network they can never communicate.\r\n\r\nThis largely means that Drone doesn't work with Docker v2. I have provided a way by environment variables where the ambassador container can assign itself to the right network.\r\n\r\nThere is currently also a bug in drone-exec preventing a build during one of the last 3 commits: \r\n\r\n```sh\r\n# github.com/drone/drone-exec/runner\r\nrunner/match.go:29: s.Build.Deploy undefined (type *plugin.Build has no field or method Deploy)\r\n```"},"comment":{"url":"https://api.github.com/repos/drone/drone-exec/issues/comments/210058694","html_url":"https://github.com/drone/drone-exec/pull/33#issuecomment-210058694","issue_url":"https://api.github.com/repos/drone/drone-exec/issues/33","id":210058694,"user":{"login":"sylus","id":984304,"avatar_url":"https://avatars.githubusercontent.com/u/984304?v=3","gravatar_id":"","url":"https://api.github.com/users/sylus","html_url":"https://github.com/sylus","followers_url":"https://api.github.com/users/sylus/followers","following_url":"https://api.github.com/users/sylus/following{/other_user}","gists_url":"https://api.github.com/users/sylus/gists{/gist_id}","starred_url":"https://api.github.com/users/sylus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sylus/subscriptions","organizations_url":"https://api.github.com/users/sylus/orgs","repos_url":"https://api.github.com/users/sylus/repos","events_url":"https://api.github.com/users/sylus/events{/privacy}","received_events_url":"https://api.github.com/users/sylus/received_events","type":"User","site_admin":false},"created_at":"2016-04-14T17:19:19Z","updated_at":"2016-04-14T17:19:19Z","body":"1) Ran the following command:\r\n\r\n```sh\r\n./drone-exec --debug --pull --cache --clone --build <<EOF\r\n{\r\n    \"system\": {\r\n        \"link\": \"http://localhost:8000\"\r\n    },\r\n    \"workspace\": {},\r\n    \"repo\": {\r\n        \"owner\": \"garyburd\",\r\n        \"name\": \"redigo\",\r\n        \"full_name\": \"garyburd/redigo\",\r\n        \"link_url\": \"https://github.com/garyburd/redigo\",\r\n        \"clone_url\": \"git://github.com/garyburd/redigo.git\",\r\n        \"trusted\": true\r\n    },\r\n    \"build\": {\r\n        \"number\": 1,\r\n        \"ref\": \"refs/heads/master\",\r\n        \"commit\": \"d8dbe4d94f15fe89232e0402c6e8a0ddf21af3ab\",\r\n        \"branch\": \"master\"\r\n    },\r\n    \"job\": {\r\n        \"environment\": {}\r\n    },\r\n    \"config\": \"{ build: { image: 'golang:1.4.2', net: host, commands: ['cd redis', 'go build', 'go test -v']}, compose: { redis: { image: 'redis:2.8', net: host } } }\"\r\n}\r\nEOF\r\n```\r\n\r\n2) Docker PS\r\n\r\n```sh\r\na83d63803ae6        redis:2.8                            \"/entrypoint.sh redis\"   backstabbing_austin\r\n062bf63b3648        gliderlabs/alpine:3.1                \"/bin/sleep 86400\"       dreamy_hugle\r\n```\r\n\r\n3) Docker Inspect dreamy_hugle\r\n\r\n```sh\r\n\"NetworkSettings\": {\r\n            \"Bridge\": \"\",\r\n            \"SandboxID\": \"f862ecc3967af87be0f2152000bae46544ad8303e09a7eeb96fec9b778b3c578\",\r\n            \"HairpinMode\": false,\r\n            \"LinkLocalIPv6Address\": \"\",\r\n            \"LinkLocalIPv6PrefixLen\": 0,\r\n            \"Ports\": {},\r\n            \"SandboxKey\": \"/var/run/docker/netns/f862ecc3967a\",\r\n            \"SecondaryIPAddresses\": null,\r\n            \"SecondaryIPv6Addresses\": null,\r\n            \"EndpointID\": \"2359a7e7beb32d38ee5781cb51c93f5f8c4929207036b7f3faa39f77854020f9\",\r\n            \"Gateway\": \"10.1.25.1\",\r\n            \"GlobalIPv6Address\": \"\",\r\n            \"GlobalIPv6PrefixLen\": 0,\r\n            \"IPAddress\": \"10.1.25.2\",\r\n            \"IPPrefixLen\": 24,\r\n            \"IPv6Gateway\": \"\",\r\n            \"MacAddress\": \"02:42:0a:01:19:02\",\r\n            \"Networks\": {\r\n                \"bridge\": {\r\n                    \"IPAMConfig\": null,\r\n                    \"Links\": null,\r\n                    \"Aliases\": null,\r\n                    \"NetworkID\": \"d6aceaa3d9a4c698a5a6c2a581a3a8090c6af532fe3c6578f13b5f450a70c2e0\",\r\n                    \"EndpointID\": \"2359a7e7beb32d38ee5781cb51c93f5f8c4929207036b7f3faa39f77854020f9\",\r\n                    \"Gateway\": \"10.1.25.1\",\r\n                    \"IPAddress\": \"10.1.25.2\",\r\n                    \"IPPrefixLen\": 24,\r\n                    \"IPv6Gateway\": \"\",\r\n                    \"GlobalIPv6Address\": \"\",\r\n                    \"GlobalIPv6PrefixLen\": 0,\r\n                    \"MacAddress\": \"02:42:0a:01:19:02\"\r\n                }\r\n            }\r\n        }\r\n```"}}