Hello!
This is indeed a very valid use case for docker.
Your Dockerfile might look something like this:
FROM debian:wheezy
RUN apt-get install ledger-2.6 # assuming this is what you need to get ledger installed
you could use that to build an image called ledger: docker build -t ledger .
Assuming the normal ledger command is something like ledger /path/to/gnucash.dat -o /images/
, you could run it something like this:
docker run -it -v /path/to/gnucash.dat:/gnucash.dat -v /path/to/images/:images ledger ledger /gnucash.dat -o /images
Your cron script on the host could call ledger using the docker run command, and then email the results. You could also do the email bit inside the container.
Hopefully this helps!