mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2024-11-28 05:15:04 +08:00
parent
3ff09c8b7a
commit
0f7ec06404
@ -867,6 +867,10 @@ func loadConfigInfo(isCreate bool, req dto.ContainerOperate, oldContainer *types
|
|||||||
config.Tty = req.Tty
|
config.Tty = req.Tty
|
||||||
|
|
||||||
if len(req.Network) != 0 {
|
if len(req.Network) != 0 {
|
||||||
|
switch req.Network {
|
||||||
|
case "host", "none", "bridge":
|
||||||
|
hostConf.NetworkMode = container.NetworkMode(req.Network)
|
||||||
|
}
|
||||||
networkConf.EndpointsConfig = map[string]*network.EndpointSettings{req.Network: {}}
|
networkConf.EndpointsConfig = map[string]*network.EndpointSettings{req.Network: {}}
|
||||||
} else {
|
} else {
|
||||||
networkConf = network.NetworkingConfig{}
|
networkConf = network.NetworkingConfig{}
|
||||||
|
Loading…
Reference in New Issue
Block a user