mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-12-20 06:26:57 +00:00
allow to specify the DOCKER_API_VERSION
Signed-off-by: Simon L. <szaimen@e.mail.de>
This commit is contained in:
parent
7560694535
commit
143cf5157c
5 changed files with 39 additions and 10 deletions
|
|
@ -26,7 +26,13 @@ readonly class DockerActionManager {
|
|||
}
|
||||
|
||||
private function BuildApiUrl(string $url): string {
|
||||
return sprintf('http://127.0.0.1/%s/%s', self::API_VERSION, $url);
|
||||
$apiVersion = getenv('DOCKER_API_VERSION');
|
||||
if ($apiVersion === false || empty($apiVersion)) {
|
||||
$apiVersion = self::API_VERSION;
|
||||
} else {
|
||||
$apiVersion = 'v'. $apiVersion;
|
||||
}
|
||||
return sprintf('http://127.0.0.1/%s/%s', $apiVersion, $url);
|
||||
}
|
||||
|
||||
private function BuildImageName(Container $container): string {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue