Implementation:ARCANGEL0 EVA install docker engine
| Knowledge Sources | |
|---|---|
| Domains | Infrastructure, System_Administration |
| Last Updated | 2026-10-29 14:00 GMT |
Overview
Concrete tool for installing Docker Engine through the host's native package manager with sudo handling and group membership setup, provided by the Mitsu Docker installer module.
Description
The install_docker_engine function automates Docker Engine installation:
- Platform check: Only supports Linux; raises on other platforms.
- Sudo detection: If not root, requires sudo and a password.
- Package manager detection: Uses `detect_package_manager` to find the first supported manager (apt-get, dnf, pacman, zypper, apk, yum).
4 Refresh package lists: Runs the manager's refresh command (e.g., `apt-get update`). 5 Install Docker: Runs the manager's install command for Docker packages (e.g., `apt-get install -y docker.io`). 6 Docker group setup: Adds the current user to the `docker` group so they can run Docker without sudo. 7 Service enable: Enables and starts the Docker systemd service.
Each step is run with the `progress` callback for status reporting.
Usage
- SearXNG prerequisite: Called from the `SearchEnginePanel` when the operator needs Docker for SearXNG but it's not installed.
- Onboarding: Called during first-run setup if the operator chooses SearXNG and Docker is missing.
Code Reference
Source Location
- Repository: Mitsu
- File: services/docker_installer.py
Signature
def install_docker_engine(
password: str,
progress: Progress | None = None,
) -> None:
Import
from mitsu.services.docker_installer import install_docker_engine
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| password | str | Yes | Sudo password (empty if running as root) |
| progress | None | No | Callback for status messages |
Outputs
| Name | Type | Description |
|---|---|---|
| returns | None | Raises DockerInstallError on failure |
Usage Examples
Install Docker
from mitsu.services.docker_installer import install_docker_engine
def report(message):
print(message)
try:
install_docker_engine(password="my-sudo-password", progress=report)
print("Docker installed successfully.")
except DockerInstallError as error:
print(f"Installation failed: {error}")
Related Pages
Implements Principle
Requires Environment
- Environment:ARCANGEL0_EVA_Linux_Host
- Environment:ARCANGEL0_EVA_Docker_Runtime
- Environment:ARCANGEL0_EVA_Python_3_10_Environment