environment(docker): set outgoing ip correctly (#135)

Closes https://github.com/pterodactyl/panel/issues/3841
This commit is contained in:
Matthew Penner
2022-09-25 18:49:48 -06:00
committed by GitHub
parent c686992e85
commit b6edf3acf9
3 changed files with 45 additions and 11 deletions

View File

@@ -41,12 +41,12 @@ func ConfigureDocker(ctx context.Context) error {
nw := config.Get().Docker.Network
resource, err := cli.NetworkInspect(ctx, nw.Name, types.NetworkInspectOptions{})
if err != nil {
if client.IsErrNotFound(err) {
log.Info("creating missing pterodactyl0 interface, this could take a few seconds...")
if err := createDockerNetwork(ctx, cli); err != nil {
return err
}
} else {
if !client.IsErrNotFound(err) {
return err
}
log.Info("creating missing pterodactyl0 interface, this could take a few seconds...")
if err := createDockerNetwork(ctx, cli); err != nil {
return err
}
}