Merge pull request #31 from kawaiinekololis/network_option

Added network option to docker configuration
This commit is contained in:
Dane Everitt 2020-05-09 18:53:59 -07:00 committed by GitHub
commit 326b5b6554
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -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"`

View File

@ -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 {