mirror of https://github.com/docker/cli.git
Merge pull request #30325 from dnephin/add-internal-to-compose-network
Add network.internal to Compose schema
This commit is contained in:
commit
42de89bf31
|
@ -58,9 +58,10 @@ func Networks(namespace Namespace, networks networkMap, servicesNetworks map[str
|
||||||
}
|
}
|
||||||
|
|
||||||
createOpts := types.NetworkCreate{
|
createOpts := types.NetworkCreate{
|
||||||
Labels: AddStackLabel(namespace, network.Labels),
|
Labels: AddStackLabel(namespace, network.Labels),
|
||||||
Driver: network.Driver,
|
Driver: network.Driver,
|
||||||
Options: network.DriverOpts,
|
Options: network.DriverOpts,
|
||||||
|
Internal: network.Internal,
|
||||||
}
|
}
|
||||||
|
|
||||||
if network.Ipam.Driver != "" || len(network.Ipam.Config) > 0 {
|
if network.Ipam.Driver != "" || len(network.Ipam.Config) > 0 {
|
||||||
|
|
|
@ -308,6 +308,7 @@
|
||||||
},
|
},
|
||||||
"additionalProperties": false
|
"additionalProperties": false
|
||||||
},
|
},
|
||||||
|
"internal": {"type": "boolean"},
|
||||||
"labels": {"$ref": "#/definitions/list_or_dict"}
|
"labels": {"$ref": "#/definitions/list_or_dict"}
|
||||||
},
|
},
|
||||||
"additionalProperties": false
|
"additionalProperties": false
|
||||||
|
|
|
@ -204,6 +204,7 @@ type NetworkConfig struct {
|
||||||
DriverOpts map[string]string `mapstructure:"driver_opts"`
|
DriverOpts map[string]string `mapstructure:"driver_opts"`
|
||||||
Ipam IPAMConfig
|
Ipam IPAMConfig
|
||||||
External External
|
External External
|
||||||
|
Internal bool
|
||||||
Labels map[string]string `compose:"list_or_dict_equals"`
|
Labels map[string]string `compose:"list_or_dict_equals"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue