Make 'dockerSocketPath' an attribute

Signed-off-by: Pablo Zmdl <pablo@nextcloud.com>
This commit is contained in:
Pablo Zmdl 2026-01-26 10:08:44 +01:00
parent c23d98eb6a
commit 39984bcf8d
2 changed files with 4 additions and 6 deletions

View file

@ -129,7 +129,7 @@ readonly class ContainerDefinitionFetcher {
continue; continue;
} }
} elseif ($value['source'] === '%WATCHTOWER_DOCKER_SOCKET_PATH%') { } elseif ($value['source'] === '%WATCHTOWER_DOCKER_SOCKET_PATH%') {
$value['source'] = $this->configurationManager->GetDockerSocketPath(); $value['source'] = $this->configurationManager->dockerSocketPath;
if($value['source'] === '') { if($value['source'] === '') {
continue; continue;
} }

View file

@ -667,11 +667,9 @@ class ConfigurationManager
set { $this->set('fulltextsearch_java_options', $value); } set { $this->set('fulltextsearch_java_options', $value); }
} }
public function GetDockerSocketPath() : string { public string $dockerSocketPath {
$envVariableName = 'WATCHTOWER_DOCKER_SOCKET_PATH'; get => $this->GetEnvironmentalVariableOrConfig('WATCHTOWER_DOCKER_SOCKET_PATH', 'docker_socket_path', '/var/run/docker.sock');
$configName = 'docker_socket_path'; set { $this->set('docker_socket_path', $value); }
$defaultValue = '/var/run/docker.sock';
return $this->GetEnvironmentalVariableOrConfig($envVariableName, $configName, $defaultValue);
} }
public function GetTrustedCacertsDir() : string { public function GetTrustedCacertsDir() : string {