mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-12-20 14:36:52 +00:00
Merge pull request #7127 from nextcloud/enh/7096/specify-api-version
allow to specify the `DOCKER_API_VERSION`
This commit is contained in:
commit
790b3d668d
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