1
Fork 0
ci-images/images/beancount-import/Dockerfile

24 lines
608 B
Docker

FROM python:3.12.6-slim
COPY requirements.txt /tmp
RUN set -eux; \
pip3 install --break-system-packages -r /tmp/requirements.txt; \
rm -rf \
/root/.cache \
/tmp/requirements.txt \
;
WORKDIR /beancount-import
COPY . .
ENV BEANCOUNT_IMPORT_ARGS="" \
BEANCOUNT_IMPORT_JOURNAL_DIR="/beancount-import/journal" \
BEANCOUNT_IMPORT_DATA_DIR="/beancount-import/data"
EXPOSE 8080
VOLUME ${BEANCOUNT_IMPORT_DATA_DIR}
VOLUME ${BEANCOUNT_IMPORT_JOURNAL_DIR}
CMD [ "python3", "/beancount-import/run.py", "--address", "0.0.0.0", "--port", "8080", "${BEANCOUNT_IMPORT_ARGS}" ]