Handle networks.driver_opts for a service
These are endpoint-specific driver options...
services:
myservice:
image: myimage
networks:
mynet:
driver_opts:
"option1": "value1"
The API has had support for a long time, it's only recently been
added to compose (unreleased right now).
Signed-off-by: Rob Murray <rob.murray@docker.com>
This commit is contained in:
@ -207,6 +207,9 @@ services:
|
||||
aliases:
|
||||
- alias1
|
||||
- alias3
|
||||
driver_opts:
|
||||
"driveropt1": "optval1"
|
||||
"driveropt2": "optval2"
|
||||
other-network:
|
||||
ipv4_address: 172.16.238.10
|
||||
ipv6_address: 2001:3984:3989::10
|
||||
|
||||
@ -190,6 +190,10 @@ func services(workingDir, homeDir string) []types.ServiceConfig {
|
||||
Aliases: []string{"alias1", "alias3"},
|
||||
Ipv4Address: "",
|
||||
Ipv6Address: "",
|
||||
DriverOpts: map[string]string{
|
||||
"driveropt1": "optval1",
|
||||
"driveropt2": "optval2",
|
||||
},
|
||||
},
|
||||
"other-network": {
|
||||
Ipv4Address: "172.16.238.10",
|
||||
|
||||
@ -285,7 +285,11 @@
|
||||
"aliases": [
|
||||
"alias1",
|
||||
"alias3"
|
||||
]
|
||||
],
|
||||
"driver_opts": {
|
||||
"driveropt1": "optval1",
|
||||
"driveropt2": "optval2"
|
||||
}
|
||||
}
|
||||
},
|
||||
"pid": "host",
|
||||
|
||||
@ -152,6 +152,9 @@ services:
|
||||
aliases:
|
||||
- alias1
|
||||
- alias3
|
||||
driver_opts:
|
||||
driveropt1: optval1
|
||||
driveropt2: optval2
|
||||
pid: host
|
||||
ports:
|
||||
- mode: ingress
|
||||
|
||||
Reference in New Issue
Block a user