Error for unsupported dockers

Added error for unsupported moby-engine and podman-docker.
This commit is contained in:
lunardunno 2025-03-18 19:57:00 +04:00
parent bb6de0c22a
commit 83850bd997
3 changed files with 5 additions and 1 deletions

View file

@ -411,6 +411,8 @@ ErrorCode ServerController::installDockerWorker(const ServerCredentials &credent
return ErrorCode::ServerPacketManagerError;
if (stdOut.contains("sudo:") && stdOut.contains("not found"))
return ErrorCode::ServerDockerFailedError;
if (stdOut.contains("Docker is not supported"))
return ErrorCode::ServerDockerNotSupported;
if (stdOut.contains("Failed docker status"))
return ErrorCode::ServerDockerStatusNotActive;

View file

@ -58,7 +58,8 @@ namespace amnezia
ServerUserDirectoryNotAccessible = 208,
ServerUserNotAllowedInSudoers = 209,
ServerUserPasswordRequired = 210,
ServerDockerStatusNotActive = 211,
ServerDockerNotSupported = 211,
ServerDockerStatusNotActive = 212,
// Ssh connection errors
SshRequestDeniedError = 300,

View file

@ -26,6 +26,7 @@ QString errorString(ErrorCode code) {
case(ErrorCode::ServerUserDirectoryNotAccessible): errorMessage = QObject::tr("The server user's home directory is not accessible"); break;
case(ErrorCode::ServerUserNotAllowedInSudoers): errorMessage = QObject::tr("Action not allowed in sudoers"); break;
case(ErrorCode::ServerUserPasswordRequired): errorMessage = QObject::tr("The user's password is required"); break;
case(ErrorCode::ServerDockerNotSupported): errorMessage = QObject::tr("Docker, which is offered for installation by default by the server's OS, is not supported"); break;
case(ErrorCode::ServerDockerStatusNotActive): errorMessage = QObject::tr("Docker service status is not active"); break;
// Libssh errors