Add multi-distro support for deckies

Introduces DistroProfile catalog (9 distros: Debian, Ubuntu 20/22,
Rocky 9, CentOS 7, Alpine, Fedora, Kali, Arch) with distro-styled
hostname generation. Adds --distro and --randomize-distros CLI flags,
a `decnet distros` listing command, and fixes composer.py which was
ignoring per-decky base_image in favour of a hardcoded Debian constant.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-03 19:05:30 -03:00
parent 3e98c71ca4
commit 65e3ea6b08
4 changed files with 186 additions and 32 deletions

View File

@@ -18,9 +18,6 @@ from decnet.services.registry import get_service
_LOG_NETWORK = "decnet_logs"
# Minimal image for the base container — just needs to stay alive.
_BASE_IMAGE = "debian:bookworm-slim"
def generate_compose(config: DecnetConfig) -> dict:
"""Build and return the full docker-compose data structure."""
@@ -31,7 +28,7 @@ def generate_compose(config: DecnetConfig) -> dict:
# --- Base container: owns the MACVLAN IP, runs nothing but sleep ---
base: dict = {
"image": _BASE_IMAGE,
"image": decky.base_image,
"container_name": base_key,
"hostname": decky.hostname,
"command": ["sleep", "infinity"],