mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
runconfig: add -net container:name option
Docker-DCO-1.1-Signed-off-by: Johan Euphrosine <proppy@google.com> (github: proppy)
This commit is contained in:
parent
d103f0186a
commit
a60159f3b1
5 changed files with 84 additions and 29 deletions
|
|
@ -7,16 +7,17 @@ import (
|
|||
)
|
||||
|
||||
type HostConfig struct {
|
||||
Binds []string
|
||||
ContainerIDFile string
|
||||
LxcConf []utils.KeyValuePair
|
||||
Privileged bool
|
||||
PortBindings nat.PortMap
|
||||
Links []string
|
||||
PublishAllPorts bool
|
||||
Dns []string
|
||||
DnsSearch []string
|
||||
VolumesFrom []string
|
||||
Binds []string
|
||||
ContainerIDFile string
|
||||
LxcConf []utils.KeyValuePair
|
||||
Privileged bool
|
||||
PortBindings nat.PortMap
|
||||
Links []string
|
||||
PublishAllPorts bool
|
||||
Dns []string
|
||||
DnsSearch []string
|
||||
VolumesFrom []string
|
||||
UseContainerNetwork string
|
||||
}
|
||||
|
||||
func ContainerHostConfigFromJob(job *engine.Job) *HostConfig {
|
||||
|
|
@ -42,5 +43,8 @@ func ContainerHostConfigFromJob(job *engine.Job) *HostConfig {
|
|||
if VolumesFrom := job.GetenvList("VolumesFrom"); VolumesFrom != nil {
|
||||
hostConfig.VolumesFrom = VolumesFrom
|
||||
}
|
||||
if UseContainerNetwork := job.Getenv("UseContainerNetwork"); UseContainerNetwork != "" {
|
||||
hostConfig.UseContainerNetwork = UseContainerNetwork
|
||||
}
|
||||
return hostConfig
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue