diff --git a/app/Actions/Application/CleanupPreviewDeployment.php b/app/Actions/Application/CleanupPreviewDeployment.php index 83f729959..74e2ff615 100644 --- a/app/Actions/Application/CleanupPreviewDeployment.php +++ b/app/Actions/Application/CleanupPreviewDeployment.php @@ -157,8 +157,9 @@ private function stopRunningContainers( foreach ($containers as $container) { $containerName = data_get($container, 'Names'); if ($containerName) { + $escapedContainerName = escapeshellarg($containerName); instant_remote_process( - ["docker rm -f $containerName"], + ["docker rm -f {$escapedContainerName}"], $server ); $killed++;