mirror of https://github.com/docker/cli.git
compose: add build.extra_hosts to v3.9 schema
This is not currently used by the CLI, but can be used by docker compose to bring parity on this feature with the compose v2.4 schema. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
f7185d27e1
commit
0c5f97ed72
|
@ -13,6 +13,9 @@ services:
|
||||||
cache_from:
|
cache_from:
|
||||||
- foo
|
- foo
|
||||||
- bar
|
- bar
|
||||||
|
extra_hosts:
|
||||||
|
- "ipv4.example.com:127.0.0.1"
|
||||||
|
- "ipv6.example.com:::1"
|
||||||
labels: [FOO=BAR]
|
labels: [FOO=BAR]
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -39,6 +39,10 @@ func services(workingDir, homeDir string) []types.ServiceConfig {
|
||||||
Target: "foo",
|
Target: "foo",
|
||||||
Network: "foo",
|
Network: "foo",
|
||||||
CacheFrom: []string{"foo", "bar"},
|
CacheFrom: []string{"foo", "bar"},
|
||||||
|
ExtraHosts: types.HostsList{
|
||||||
|
"ipv4.example.com:127.0.0.1",
|
||||||
|
"ipv6.example.com:::1",
|
||||||
|
},
|
||||||
Labels: map[string]string{"FOO": "BAR"},
|
Labels: map[string]string{"FOO": "BAR"},
|
||||||
},
|
},
|
||||||
CapAdd: []string{"ALL"},
|
CapAdd: []string{"ALL"},
|
||||||
|
@ -526,6 +530,9 @@ services:
|
||||||
cache_from:
|
cache_from:
|
||||||
- foo
|
- foo
|
||||||
- bar
|
- bar
|
||||||
|
extra_hosts:
|
||||||
|
- ipv4.example.com:127.0.0.1
|
||||||
|
- ipv6.example.com:::1
|
||||||
network: foo
|
network: foo
|
||||||
target: foo
|
target: foo
|
||||||
cap_add:
|
cap_add:
|
||||||
|
@ -998,6 +1005,10 @@ func fullExampleJSON(workingDir string) string {
|
||||||
"foo",
|
"foo",
|
||||||
"bar"
|
"bar"
|
||||||
],
|
],
|
||||||
|
"extra_hosts": [
|
||||||
|
"ipv4.example.com:127.0.0.1",
|
||||||
|
"ipv6.example.com:::1"
|
||||||
|
],
|
||||||
"network": "foo",
|
"network": "foo",
|
||||||
"target": "foo"
|
"target": "foo"
|
||||||
},
|
},
|
||||||
|
|
|
@ -583,45 +583,45 @@ ean7MQBPP+U4w19V/z+t/hsAAP//Fd/bF0ZHAAA=
|
||||||
"/data/config_schema_v3.9.json": {
|
"/data/config_schema_v3.9.json": {
|
||||||
name: "config_schema_v3.9.json",
|
name: "config_schema_v3.9.json",
|
||||||
local: "data/config_schema_v3.9.json",
|
local: "data/config_schema_v3.9.json",
|
||||||
size: 18291,
|
size: 18362,
|
||||||
modtime: 1518458244,
|
modtime: 1518458244,
|
||||||
compressed: `
|
compressed: `
|
||||||
H4sIAAAAAAAC/+xcS4/juBG++1cI2r1tPwbIIsDOLcecknMaHoGmyja3KZJbpDztHfi/B3q2RJEibcvd
|
H4sIAAAAAAAC/+xcS4/jNhK++1cISm7pxwAbLJC57XFPu+dteASaKttMUyRTpDztDPq/L/RsiSJFylY/
|
||||||
vUkHCHZaKj6K9eBXD/nHKknSnzXdQ0HSr0m6N0Z9fXz8XUtx3zx9kLh7zJFszf2XXx+bZz+ld9U4lldD
|
stsBgmlbxUc9+VWx5B+bJEl/1vQIBUm/JunRGPX1/v53LcVt8+2dxMN9jmRvbr/8et9891N6U41jeTWE
|
||||||
qBRbtsuaN9nhbw+/PVTDGxJzVFARyc3vQE3zDOGPkiFUg5/SA6BmUqTru1X1TqFUgIaBTr8m1eaSpCfp
|
SrFnh6x5kp3+dvfbXTW8ITFnBRWR3P0O1DTfIfxRMoRq8EN6AtRMinR7s6meKZQK0DDQ6dek2lyS9CTd
|
||||||
Hgym1QaZ2KX141M9Q5KkGvDA6GCGfqs/Pb7O/9iT3dmzDjZbP1fEGEDx7+ne6tffnsj9n/+4/8+X+98e
|
F4NptUEmDmn99XM9Q5KkGvDE6GCGfqs/3b/Mf9+T3dizDjZbf6+IMYDi39O91Y+/PZDbP/9x+58vt7/d
|
||||||
svv1Lz+PXlfni7Btls9hywQzTIp+/bSnPLX/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
||||||
"cache_from": {"$ref": "#/definitions/list_of_strings"},
|
"cache_from": {"$ref": "#/definitions/list_of_strings"},
|
||||||
"network": {"type": "string"},
|
"network": {"type": "string"},
|
||||||
"target": {"type": "string"},
|
"target": {"type": "string"},
|
||||||
"shm_size": {"type": ["integer", "string"]}
|
"shm_size": {"type": ["integer", "string"]},
|
||||||
|
"extra_hosts": {"$ref": "#/definitions/list_or_dict"}
|
||||||
},
|
},
|
||||||
"additionalProperties": false
|
"additionalProperties": false
|
||||||
}
|
}
|
||||||
|
|
|
@ -221,6 +221,7 @@ type BuildConfig struct {
|
||||||
Args MappingWithEquals `yaml:",omitempty" json:"args,omitempty"`
|
Args MappingWithEquals `yaml:",omitempty" json:"args,omitempty"`
|
||||||
Labels Labels `yaml:",omitempty" json:"labels,omitempty"`
|
Labels Labels `yaml:",omitempty" json:"labels,omitempty"`
|
||||||
CacheFrom StringList `mapstructure:"cache_from" yaml:"cache_from,omitempty" json:"cache_from,omitempty"`
|
CacheFrom StringList `mapstructure:"cache_from" yaml:"cache_from,omitempty" json:"cache_from,omitempty"`
|
||||||
|
ExtraHosts HostsList `mapstructure:"extra_hosts" yaml:"extra_hosts,omitempty" json:"extra_hosts,omitempty"`
|
||||||
Network string `yaml:",omitempty" json:"network,omitempty"`
|
Network string `yaml:",omitempty" json:"network,omitempty"`
|
||||||
Target string `yaml:",omitempty" json:"target,omitempty"`
|
Target string `yaml:",omitempty" json:"target,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue