Package the export pipeline as a single self-contained container for Unraid #1
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
The MS_SimpleExport market-data export currently runs as "Form A": a host bash
orchestrator (
scripts/export-runner.sh) that spawns one ephemeralghcr.io/spotware/ctrader-consolecontainer per backtest window. It is hardened(
docs/export-runner-quirks.md) and runs daily at 03:30 via a systemd timer(
deploy/systemd/ctrader-export.timer)."Form B" packages the same pipeline as a single self-contained Docker image, so the
Unraid redeployment is one container template to start, stop, and schedule — no host
bash script and no Docker socket. It is a packaging/convenience change, not a functional
one; Form A already runs.
Approach (not docker-in-docker)
Verified this session:
ghcr.io/spotware/ctrader-console:latestis Debian 11 and ships/bin/bash,dotnet, and GNU coreutils; its entrypoint isdotnet ctrader-cli.dllwith the console binary at
/app/ctrader-cli.dll.Build a new image
FROM ghcr.io/spotware/ctrader-console:latest, bundle the runner andthe built
.algo, and rewrite the per-run step to invoke the console binary directly asa subprocess instead of
docker run:Its stdout is read directly (no
docker run/docker logs), which also simplifies therun loop relative to Form A.
Known gotcha (verified this session)
The cTrader CLI process lingers after the backtest — it does not self-exit. In Form A a
docker stopnet reaps it; in Form B the subprocess must be explicitly killed once theresult marker is seen (a
killof the subprocess replacing thedocker stop).Mounts
/mnt/Data.algo+password.txt) ->/mnt/RobotsAcceptance
docker run -v <data>:/mnt/Data -v <robots>:/mnt/Robots <image>runs the full scrapedocs/export-runner-quirks.md)