mirror of https://github.com/1Panel-dev/1Panel
refactor(init): run docker network creation and firewall setup in a goroutine (#7336)
parent
75d94f5b89
commit
2c8dad980b
|
@ -31,11 +31,13 @@ func Init() {
|
||||||
createDir(fileOp, dir)
|
createDir(fileOp, dir)
|
||||||
}
|
}
|
||||||
|
|
||||||
_ = docker.CreateDefaultDockerNetwork()
|
go func() {
|
||||||
|
_ = docker.CreateDefaultDockerNetwork()
|
||||||
|
|
||||||
if f, err := firewall.NewFirewallClient(); err == nil {
|
if f, err := firewall.NewFirewallClient(); err == nil {
|
||||||
_ = f.EnableForward()
|
_ = f.EnableForward()
|
||||||
}
|
}
|
||||||
|
}()
|
||||||
}
|
}
|
||||||
|
|
||||||
func createDir(fileOp files.FileOp, dirPath string) {
|
func createDir(fileOp files.FileOp, dirPath string) {
|
||||||
|
|
Loading…
Reference in New Issue