# 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
# python3 for the scripts; libarchive-tools (bsdtar) to peek inside zip/rar/7z
# archives during hand-off classification (reads RAR5, which 7zip's Alpine build can't).
RUN apk add --no-cache python3 libarchive-tools

WORKDIR /app
COPY orchestrate.py handoff.py run.sh channels.json ./
RUN chmod +x run.sh

ENTRYPOINT ["./run.sh"]
