Implement network_mode in v2
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
This commit is contained in:
parent
a267d8fe3c
commit
e566a4dc1c
16 changed files with 405 additions and 87 deletions
12
tests/fixtures/extends/invalid-net-v2.yml
vendored
Normal file
12
tests/fixtures/extends/invalid-net-v2.yml
vendored
Normal 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
9
tests/fixtures/networks/bridge.yml
vendored
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
version: 2
|
||||
|
||||
services:
|
||||
web:
|
||||
image: busybox
|
||||
command: top
|
||||
networks:
|
||||
- bridge
|
||||
- default
|
||||
27
tests/fixtures/networks/network-mode.yml
vendored
Normal file
27
tests/fixtures/networks/network-mode.yml
vendored
Normal 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
|
||||
17
tests/fixtures/networks/predefined-networks.yml
vendored
17
tests/fixtures/networks/predefined-networks.yml
vendored
|
|
@ -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: []
|
||||
Loading…
Add table
Add a link
Reference in a new issue