Added network option to docker configuration

This commit is contained in:
Kawaii Neko Lolis 2020-05-10 03:29:56 +02:00
parent 5e60cb2eb0
commit cfca0d7f07
2 changed files with 2 additions and 1 deletions

View File

@ -26,6 +26,7 @@ type DockerNetworkConfiguration struct {
Name string `default:"pterodactyl_nw"`
ISPN bool `default:"false" yaml:"ispn"`
Driver string `default:"bridge"`
Mode string `default:"pterodactyl_nw" yaml:"network_mode"`
IsInternal bool `default:"false" yaml:"is_internal"`
EnableICC bool `default:"true" yaml:"enable_icc"`
Interfaces dockerNetworkInterfaces `yaml:"interfaces"`

View File

@ -665,7 +665,7 @@ func (d *DockerEnvironment) Create() error {
"setpcap", "mknod", "audit_write", "net_raw", "dac_override",
"fowner", "fsetid", "net_bind_service", "sys_chroot", "setfcap",
},
NetworkMode: "pterodactyl_nw",
NetworkMode: container.NetworkMode(config.Get().Docker.Network.Mode),
}
if _, err := cli.ContainerCreate(ctx, conf, hostConf, nil, d.Server.Uuid); err != nil {