1
Fork 0
ci-images/images/fava/Dockerfile
Lucas Schwiderski 37e4aa6864
All checks were successful
build/base Building image base
build/frp Building image frp
build/lua-clib Building image lua-clib
build/fluentd Building image fluentd
build/ruby-script Building image ruby-script
build/forgejo Building image forgejo
build/node-script Building image node-script
Merge pull request 'chore(deps): update python docker tag to v3.13.2' (#161) from renovate/python-3.x into master
Reviewed-on: #161
2025-02-18 13:06:19 +00:00

59 lines
1.6 KiB
Docker

# renovate: datasource=github-tags depName=beancount packageName=beancount/beancount
ARG BEANCOUNT_VERSION=2.3.6
# renovate: datasource=github-tags depName=fava packageName=beancount/fava
ARG FAVA_VERSION=1.30
FROM node:22.14.0-slim AS node_build_env
ARG FAVA_VERSION
RUN set -eux; \
apt-get update; \
apt-get install -y python3-babel git make;
RUN git clone --depth 1 --branch v${FAVA_VERSION} https://github.com/beancount/fava /tmp/build/fava;
WORKDIR /tmp/build/fava
RUN set -eux; \
make -j $(nproc); \
rm -rf .*cache .eggs .tox build dist frontend/node_modules; \
find . -type f -name '*.py[c0]' -delete; \
find . -type d -name "__pycache__" -delete;
FROM python:3.13.2-slim AS build_env
ARG BEANCOUNT_VERSION
ENV PATH "/app/bin:$PATH"
RUN set -eux; \
apt-get update; \
apt-get install -y build-essential libxml2-dev libxslt-dev curl git; \
python -mvenv /app;
COPY --from=node_build_env /tmp/build/fava /tmp/build/fava
RUN git clone --depth 1 --branch ${BEANCOUNT_VERSION} https://github.com/beancount/beancount /tmp/build/beancount;
WORKDIR /tmp/build/beancount
COPY requirements.txt ./
RUN set -eux; \
CFLAGS=-s pip3 install -U /tmp/build/beancount; \
pip3 install -U /tmp/build/fava; \
pip3 install -r requirements.txt; \
pip3 uninstall -y pip; \
rm -r /app/share; \
find /app -name __pycache__ -exec rm -rf -v {} +
FROM python:3.13.2-slim
COPY --from=build_env /app /app
# Default fava port number
EXPOSE 5000
ENV BEAN_ROOT ""
ENV BEANCOUNT_FILE ""
ENV FAVA_HOST "0.0.0.0"
ENV PATH "/app/bin:$PATH"
CMD ["fava"]