mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Allow --net=none & -h
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
This commit is contained in:
parent
9ac293e1a8
commit
f411f8bfc5
1 changed files with 2 additions and 2 deletions
|
@ -18,7 +18,7 @@ var (
|
||||||
ErrInvalidWorkingDirectory = fmt.Errorf("The working directory is invalid. It needs to be an absolute path.")
|
ErrInvalidWorkingDirectory = fmt.Errorf("The working directory is invalid. It needs to be an absolute path.")
|
||||||
ErrConflictAttachDetach = fmt.Errorf("Conflicting options: -a and -d")
|
ErrConflictAttachDetach = fmt.Errorf("Conflicting options: -a and -d")
|
||||||
ErrConflictDetachAutoRemove = fmt.Errorf("Conflicting options: --rm and -d")
|
ErrConflictDetachAutoRemove = fmt.Errorf("Conflicting options: --rm and -d")
|
||||||
ErrConflictNetworkHostname = fmt.Errorf("Conflicting options: -h and --net")
|
ErrConflictNetworkHostname = fmt.Errorf("Conflicting options: -h and the network mode (--net)")
|
||||||
)
|
)
|
||||||
|
|
||||||
//FIXME Only used in tests
|
//FIXME Only used in tests
|
||||||
|
@ -104,7 +104,7 @@ func parseRun(cmd *flag.FlagSet, args []string, sysInfo *sysinfo.SysInfo) (*Conf
|
||||||
return nil, nil, cmd, ErrConflictDetachAutoRemove
|
return nil, nil, cmd, ErrConflictDetachAutoRemove
|
||||||
}
|
}
|
||||||
|
|
||||||
if *flNetMode != "bridge" && *flHostname != "" {
|
if *flNetMode != "bridge" && *flNetMode != "none" && *flHostname != "" {
|
||||||
return nil, nil, cmd, ErrConflictNetworkHostname
|
return nil, nil, cmd, ErrConflictNetworkHostname
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue