From d9724f39e6d0d80d4db4e68a07c6f6c619211a95 Mon Sep 17 00:00:00 2001 From: ginnoir Date: Sun, 7 Jun 2026 18:57:42 -0500 Subject: [PATCH] fix(romhacks): build on Alpine DCE base (apk + self-contained CLI) The tyrrrz/discordchatexporter image is Alpine, not Debian, and ships DCE as a self-contained executable (no dotnet on PATH). Use apk for python3 and invoke /opt/app/DiscordChatExporter.Cli directly. --- stacks/romhacks/orchestrator/Dockerfile | 8 ++++---- stacks/romhacks/orchestrator/orchestrate.py | 13 +++++++------ 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/stacks/romhacks/orchestrator/Dockerfile b/stacks/romhacks/orchestrator/Dockerfile index 4bf0981..4073aaa 100644 --- a/stacks/romhacks/orchestrator/Dockerfile +++ b/stacks/romhacks/orchestrator/Dockerfile @@ -1,12 +1,12 @@ -# Orchestrator = DiscordChatExporter (has .NET + the DCE CLI) + Python for parsing. +# Orchestrator = DiscordChatExporter (self-contained .NET CLI at +# /opt/app/DiscordChatExporter.Cli) + Python3 for parsing. The DCE image is +# Alpine-based, so install via apk. The parser uses only the stdlib (no pip deps). # Baking scripts + channels.json into the image avoids Portainer's relative # FILE-bind quirk (see docker-compose.yml header). FROM tyrrrz/discordchatexporter:stable USER root -RUN apt-get update \ - && apt-get install -y --no-install-recommends python3 python3-requests \ - && rm -rf /var/lib/apt/lists/* +RUN apk add --no-cache python3 WORKDIR /app COPY orchestrate.py run.sh channels.json ./ diff --git a/stacks/romhacks/orchestrator/orchestrate.py b/stacks/romhacks/orchestrator/orchestrate.py index 41e2836..f30f557 100644 --- a/stacks/romhacks/orchestrator/orchestrate.py +++ b/stacks/romhacks/orchestrator/orchestrate.py @@ -57,22 +57,23 @@ def slug(s): def find_dce(): - direct = "/opt/app/DiscordChatExporter.Cli.dll" + # Self-contained single-file executable in the Alpine DCE image (no `dotnet`). + direct = "/opt/app/DiscordChatExporter.Cli" if os.path.exists(direct): return direct - hits = glob.glob("/opt/**/DiscordChatExporter.Cli.dll", recursive=True) + hits = glob.glob("/opt/**/DiscordChatExporter.Cli", recursive=True) return hits[0] if hits else None def run_dce(channel_id): - dll = find_dce() - if not dll: - print("[romhacks] DiscordChatExporter.Cli.dll not found in image", file=sys.stderr) + dce = find_dce() + if not dce: + print("[romhacks] DiscordChatExporter.Cli not found in image", file=sys.stderr) return False out = EXPORTS / channel_id out.mkdir(parents=True, exist_ok=True) cmd = [ - "dotnet", dll, "export", + dce, "export", "-t", TOKEN, "-c", channel_id, "-f", "Json",