Implement network_mode in v2

Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
This commit is contained in:
Aanand Prasad 2016-01-25 12:45:30 +00:00
commit e566a4dc1c
16 changed files with 405 additions and 87 deletions

View file

@ -0,0 +1,12 @@
version: 2
services:
myweb:
build: '.'
extends:
service: web
command: top
web:
build: '.'
network_mode: "service:net"
net:
build: '.'

9
tests/fixtures/networks/bridge.yml vendored Normal file
View file

@ -0,0 +1,9 @@
version: 2
services:
web:
image: busybox
command: top
networks:
- bridge
- default

View file

@ -0,0 +1,27 @@
version: 2
services:
bridge:
image: busybox
command: top
network_mode: bridge
service:
image: busybox
command: top
network_mode: "service:bridge"
container:
image: busybox
command: top
network_mode: "container:composetest_network_mode_container"
host:
image: busybox
command: top
network_mode: host
none:
image: busybox
command: top
network_mode: none

View file

@ -1,17 +0,0 @@
version: 2
services:
bridge:
image: busybox
command: top
networks: ["bridge"]
host:
image: busybox
command: top
networks: ["host"]
none:
image: busybox
command: top
networks: []