This docker image provides hledger, the plain text accounting software, and associated tools:
latest,1.20.4,latest-dev,1.20.4-dev1.20.3,1.20.3-dev,1.20.2,1.20.2-dev,1.20,1.20-dev,1.19.1,1.19.1-dev,1.19,1.19-dev,1.18.1,1.18.1-dev,1.18,1.18-dev,1.17.1.1,1.17,1.16.2,1.16.1,1.15.2,1.15.1,1.14,1.14.1,1.14.2By default, container will start hledger-web on port 5000, reading journal hledger.journal from volume data, so assuming your journal is in ~/journals/all.journal, you can run:
docker run --rm -d -e HLEDGER_JOURNAL_FILE=/data/all.journal -v "$HOME/journals:/data" -p 5000:5000 --user $(id --user) dastapov/hledger
and navigate to http://localhost:5000 for hledger-web
If you have LEDGER_FILE environmed variable defined already, you can try:
docker run --rm -d -e HLEDGER_JOURNAL_FILE=/data/$(basename $LEDGER_FILE) -v "$(dirname $LEDGER_FILE):/data" -p 5000:5000 --user $(id --user) dastapov/hledger
Github repo contains helper script that simplifies invocation:
./run.sh ~/journals/all.journal web
HLEDGER_JOURNAL_FILE
HLEDGER_HOST
HLEDGER_PORT
HLEDGER_DEBUG
HLEDGER_BASE_URL
HLEDGER_FILE_URL
HLEDGER_RULES_FILE
You can use this image to run command-line version of hledger (or hledger-iadd, hledger-ui, ...) by
providing alternative start command to docker run.
You can just drop into a shell in the container and run hledger there (remember to include -it):
docker run --rm -it -v "$HOME/hledger-data:/data" --user $(id --user) dastapov/hledger bash
Github repo contains helper script that simplifies invocation:
./run.sh ~/journals/all.journal bash
You can use docker run to invoke hledger directly:
docker run --rm -v "$HOME/hledger-data:/data" --user $(id --user) dastapov/hledger hledger -f /data/hledger.journal stats
Make sure you provide --rm argument to docker run, otherwise your containers will be kept in the container
registry even after you are done with them, which is probably not what you want.
You can use the supplied Dockerfile to get yourself an image for hledger development. Build target dev
will get you Debian-based image with stack and all the build dependencies of hledger installed:
docker image build --tag hledger-dev --target dev .
Alternatively, you can use pre-built image via latest-dev or VERSION-dev tags:
docker run --rm -it -v "$HOME/hledger-data:/data" dastapov/hledger:latest-dev bash
Content type
Image
Digest
Size
57.6 MB
Last updated
over 5 years ago
docker pull chainsquad/hledger