Added network option to docker configuration
This commit is contained in:
parent
5e60cb2eb0
commit
cfca0d7f07
|
@ -26,6 +26,7 @@ type DockerNetworkConfiguration struct {
|
||||||
Name string `default:"pterodactyl_nw"`
|
Name string `default:"pterodactyl_nw"`
|
||||||
ISPN bool `default:"false" yaml:"ispn"`
|
ISPN bool `default:"false" yaml:"ispn"`
|
||||||
Driver string `default:"bridge"`
|
Driver string `default:"bridge"`
|
||||||
|
Mode string `default:"pterodactyl_nw" yaml:"network_mode"`
|
||||||
IsInternal bool `default:"false" yaml:"is_internal"`
|
IsInternal bool `default:"false" yaml:"is_internal"`
|
||||||
EnableICC bool `default:"true" yaml:"enable_icc"`
|
EnableICC bool `default:"true" yaml:"enable_icc"`
|
||||||
Interfaces dockerNetworkInterfaces `yaml:"interfaces"`
|
Interfaces dockerNetworkInterfaces `yaml:"interfaces"`
|
||||||
|
|
|
@ -665,7 +665,7 @@ func (d *DockerEnvironment) Create() error {
|
||||||
"setpcap", "mknod", "audit_write", "net_raw", "dac_override",
|
"setpcap", "mknod", "audit_write", "net_raw", "dac_override",
|
||||||
"fowner", "fsetid", "net_bind_service", "sys_chroot", "setfcap",
|
"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 {
|
if _, err := cli.ContainerCreate(ctx, conf, hostConf, nil, d.Server.Uuid); err != nil {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user