Refactor parseDockerComposeFile function in shared.php to escape service labels with escapeDollarSign

This commit is contained in:
Andras Bacsai 2024-04-26 09:32:47 +02:00
parent 96883dabe3
commit 83a29f8d85

View File

@ -1268,6 +1268,11 @@ function parseDockerComposeFile(Service|Application $resource, bool $isNew = fal
$serviceLabels->push("$removedLabelName=$removedLabel");
}
}
if ($serviceLabels->count() > 0) {
$serviceLabels = $serviceLabels->map(function ($value, $key) {
return escapeDollarSign($value);
});
}
$baseName = generateApplicationContainerName($resource, $pull_request_id);
$containerName = "$serviceName-$baseName";
if (count($serviceVolumes) > 0) {