mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-01-31 14:08:06 +08:00
refactor(init): run docker network creation and firewall setup in a goroutine (#7336)
This commit is contained in:
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…
x
Reference in New Issue
Block a user