From 9b54be06bbecbdc6a273b07ccc92fca9eab606d1 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Sat, 17 Oct 2020 14:09:02 -0700 Subject: [PATCH] Remove unused config values --- config/config_docker.go | 8 -------- environment/docker.go | 5 +++-- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/config/config_docker.go b/config/config_docker.go index 9db3190..3d561df 100644 --- a/config/config_docker.go +++ b/config/config_docker.go @@ -49,14 +49,6 @@ type DockerConfiguration struct { // Domainname is the Docker domainname for all containers. Domainname string `default:"" json:"domainname" yaml:"domainname"` - // If true, container images will be updated when a server starts if there - // is an update available. If false the daemon will not attempt updates and will - // defer to the host system to manage image updates. - UpdateImages bool `default:"true" json:"update_images" yaml:"update_images"` - - // The location of the Docker socket. - Socket string `default:"/var/run/docker.sock" json:"socket" yaml:"socket"` - // Registries . Registries map[string]RegistryConfiguration `json:"registries" yaml:"registries"` diff --git a/environment/docker.go b/environment/docker.go index 9165e37..569c492 100644 --- a/environment/docker.go +++ b/environment/docker.go @@ -3,6 +3,7 @@ package environment import ( "context" "github.com/apex/log" + "strconv" "sync" "github.com/docker/docker/api/types" @@ -24,7 +25,7 @@ func DockerClient() (*client.Client, error) { return _client, nil } - _client, err := client.NewClientWithOpts(client.FromEnv, client.WithAPIVersionNegotiation()); + _client, err := client.NewClientWithOpts(client.FromEnv, client.WithAPIVersionNegotiation()) return _client, err } @@ -83,7 +84,7 @@ func createDockerNetwork(cli *client.Client, c *config.DockerConfiguration) erro Options: map[string]string{ "encryption": "false", "com.docker.network.bridge.default_bridge": "false", - "com.docker.network.bridge.enable_icc": "true", + "com.docker.network.bridge.enable_icc": strconv.FormatBool(c.Network.EnableICC), "com.docker.network.bridge.enable_ip_masquerade": "true", "com.docker.network.bridge.host_binding_ipv4": "0.0.0.0", "com.docker.network.bridge.name": "pterodactyl0",