Connect services to networks with the 'networks' key
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
This commit is contained in:
parent
3f9038aea9
commit
3eafdbb01b
12 changed files with 195 additions and 78 deletions
20
tests/fixtures/networks/docker-compose.yml
vendored
20
tests/fixtures/networks/docker-compose.yml
vendored
|
|
@ -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: {}
|
||||
|
|
|
|||
10
tests/fixtures/networks/missing-network.yml
vendored
Normal file
10
tests/fixtures/networks/missing-network.yml
vendored
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
version: 2
|
||||
|
||||
services:
|
||||
web:
|
||||
image: busybox
|
||||
command: top
|
||||
networks: ["foo"]
|
||||
|
||||
networks:
|
||||
bar: {}
|
||||
5
tests/fixtures/no-services/docker-compose.yml
vendored
Normal file
5
tests/fixtures/no-services/docker-compose.yml
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
version: 2
|
||||
|
||||
networks:
|
||||
foo: {}
|
||||
bar: {}
|
||||
Loading…
Add table
Add a link
Reference in a new issue