fix: terminal

This commit is contained in:
Andras Bacsai
2024-09-16 15:35:44 +02:00
parent 35f23cfb96
commit f71fb7266d
14 changed files with 118 additions and 59 deletions

View File

@@ -24,7 +24,7 @@ class Terminal extends Component
if ($isContainer) {
$status = getContainerStatus($server, $identifier);
if ($status !== 'running') {
return handleError(new \Exception('Container is not running'), $this);
return;
}
$command = generateSshCommand($server, "docker exec -it {$identifier} sh -c 'if [ -f ~/.profile ]; then . ~/.profile; fi; if [ -n \"\$SHELL\" ]; then exec \$SHELL; else sh; fi'");
} else {