Add hledger aarch64 build
This commit is contained in:
parent
02f78d4c0e
commit
7d7d59f878
2
.gitattributes
vendored
Normal file
2
.gitattributes
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
hledger/bin/hledger filter=lfs diff=lfs merge=lfs -text
|
||||
hledger/bin/hledger-web filter=lfs diff=lfs merge=lfs -text
|
@ -16,6 +16,8 @@ services:
|
||||
- "${LEDGER_DIR}:/data"
|
||||
entrypoint: ["ledger-analytics", "-f", "/data/${LEDGER_FILE}"]
|
||||
hledger:
|
||||
# If you are running on ARM64, build the Dockerfile in this repo in the
|
||||
# hledger directory.
|
||||
image: "dastapov/hledger:1.26"
|
||||
ports:
|
||||
- "${HLEDGER_PORT}:5000"
|
||||
|
10
hledger/Dockerfile
Normal file
10
hledger/Dockerfile
Normal file
@ -0,0 +1,10 @@
|
||||
FROM ubuntu:20.04
|
||||
|
||||
COPY bin/hledger /usr/local/bin/hledger
|
||||
COPY bin/hledger-web /usr/local/bin/hledger-web
|
||||
COPY start.sh /start.sh
|
||||
|
||||
ENV LC_ALL C.UTF-8
|
||||
EXPOSE 5000 5001
|
||||
|
||||
CMD ["/start.sh"]
|
20
hledger/bin/README.md
Normal file
20
hledger/bin/README.md
Normal file
@ -0,0 +1,20 @@
|
||||
These binary files are built for aarch64 using the following steps. If you are
|
||||
not on that architecture, you should use the official published image
|
||||
`dastapov/hledger`.
|
||||
|
||||
```bash
|
||||
docker run -it --entrypoint bash ubuntu:20.04
|
||||
|
||||
# Then in the container...
|
||||
apt update
|
||||
apt install -y make curl libnuma1 build-essential libffi-dev libffi7 libgmp-dev libgmp10 libncurses-dev libncurses5 libtinfo5 zlib1g-dev
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh
|
||||
export LANG=C.UTF-8
|
||||
cd /hledger
|
||||
stack install --allow-different-user hledger
|
||||
stack install --allow-different-user hledger-web
|
||||
|
||||
# Then in another terminal without letting that container terminate...
|
||||
docker cp ____:/root/.local/bin/hledger bin/.
|
||||
docker cp ____:/root/.local/bin/hledger-web bin/.
|
||||
```
|
3
hledger/bin/hledger
Executable file
3
hledger/bin/hledger
Executable file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:3ab9702bdb074be018c8df6bf26c79548edc3190ee0169abe8a039cb5b37954d
|
||||
size 36947640
|
3
hledger/bin/hledger-web
Executable file
3
hledger/bin/hledger-web
Executable file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:0ea193d02a1bc62f101d5dc9ae9950cab87ee88bea76a9220a2fdfd241389363
|
||||
size 98665312
|
21
hledger/start.sh
Normal file
21
hledger/start.sh
Normal file
@ -0,0 +1,21 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Retrieved from https://github.com/simonmichael/hledger/blob/master/docker/start.sh
|
||||
|
||||
echo "host: ${HLEDGER_HOST:=0.0.0.0}"
|
||||
echo "port: ${HLEDGER_PORT:=5000}"
|
||||
echo "base url: ${HLEDGER_BASE_URL:="http://localhost:$HLEDGER_PORT"}"
|
||||
echo "file url: ${HLEDGER_FILE_URL:=}"
|
||||
echo "input file: ${HLEDGER_JOURNAL_FILE:=/data/hledger.journal}"
|
||||
echo "debug level: ${HLEDGER_DEBUG:=1}"
|
||||
echo "rules file: ${HLEDGER_RULES_FILE:=/data/hledger.rules}"
|
||||
|
||||
exec hledger-web \
|
||||
--server \
|
||||
--host=$HLEDGER_HOST \
|
||||
--port=$HLEDGER_PORT \
|
||||
--file "$HLEDGER_JOURNAL_FILE" \
|
||||
--debug=$HLEDGER_DEBUG \
|
||||
--base-url=$HLEDGER_BASE_URL \
|
||||
--file-url=$HLEDGER_FILE_URL \
|
||||
--rules-file="$HLEDGER_RULES_FILE"
|
Reference in New Issue
Block a user