Connect services to networks with the 'networks' key

Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
This commit is contained in:
Aanand Prasad 2016-01-13 17:00:31 +00:00
commit 3eafdbb01b
12 changed files with 195 additions and 78 deletions

View file

@ -1,7 +1,19 @@
version: 2
networks:
foo:
driver:
services:
web:
image: busybox
command: top
networks: ["front"]
app:
image: busybox
command: top
networks: ["front", "back"]
db:
image: busybox
command: top
networks: ["back"]
bar: {}
networks:
front: {}
back: {}

View file

@ -0,0 +1,10 @@
version: 2
services:
web:
image: busybox
command: top
networks: ["foo"]
networks:
bar: {}

View file

@ -0,0 +1,5 @@
version: 2
networks:
foo: {}
bar: {}