Minimal Dockerfiles for building aMule daemon containers on Alpine.
Dockerfile/entrypoint.sh— production image:amuled,amulecmd,alcc,ed2kDockerfile-gdb/entrypoint-gdb.sh— debug image:RelWithDebInfobuild run undergdb -batch, so any SIGSEGV/SIGABRT prints a full backtrace todocker logsand the container exits with the child's real return code
Both Dockerfiles expect an amule-src/ directory next to them at build time, with .git intact (cmake runs git describe to embed the rev into the banner):
git clone https://github.com/amule-project/amule.git amule-src
Then pick one:
# Production
docker build -t amule .
# gdb-debug
docker build -f Dockerfile-gdb -t amule-gdb .
Same invocation for either image — swap the trailing tag (amule or amule-gdb):
docker run --rm -p 4712:4712 -p 4662:4662 -p 4665:4665/udp -p 4672:4672/udp \
-v "$PWD/data:/home/amule/.aMule" \
-e AMULE_GUI_PWD=changeme \
amule
The entrypoint honors AMULE_USER, AMULE_GUI_PWD, and the four standard aMule ports.
These are deliberately small — intended as a build/debug reference, not a polished multi-arch distribution. For that, use ngosang/docker-amule.
Gotchas baked into entrypoint-gdb.sh (the non-obvious ones):
- gdb runs as PID 1, so
docker stopwould otherwise hit gdb instead of amuled. The entrypoint pgreps gdb's child and forwards SIGTERM. gdb -batch --return-child-resultso docker exit codes reflect amuled's, not gdb's.set disable-randomization offsilences gdb's "can't toggle ASLR" warning that fires in every container runtime.- On Alpine, don't list
muslexplicitly alongsidemusl-dbg— the strict==version constraint creates unsolvable apk conflicts.