refactor(database): simplify database type checks in ServiceDatabase and enhance image validation in Docker helper

This commit is contained in:
Andras Bacsai
2025-04-21 09:57:27 +02:00
parent c388e30499
commit 6d12e7edc7
2 changed files with 5 additions and 3 deletions

View File

@@ -682,8 +682,10 @@ function isDatabaseImage(?string $image = null)
$image = str($image)->append(':latest');
}
$imageName = $image->before(':');
if (collect(DATABASE_DOCKER_IMAGES)->contains($imageName)) {
return true;
foreach (DATABASE_DOCKER_IMAGES as $database_docker_image) {
if (str($imageName)->contains($database_docker_image)) {
return true;
}
}
return false;