mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2024-12-04 09:49:20 +08:00
parent
5f009152d3
commit
0449100e23
@ -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