Dockerfile.hot 702 Bytes
Newer Older
1
ARG BORG_ARCH
2
FROM noplanman/borg-binary-builder:base-1.1.10-${BORG_ARCH}
3 4

ARG BORG_ARCH
5
ARG BORG_VERSION=1.1.10
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28

ENV BORG_DIR /borg
ENV BORG_BUILD_DIR ${BORG_DIR}/dist

WORKDIR ${BORG_DIR}

# fetch latest borg source code for this version
RUN set -ex; \
    git fetch --all; \
    git checkout ${BORG_VERSION};

# install borg + dependencies
RUN set -ex; \
    pip install -r requirements.d/development.txt; \
    pip install -r requirements.d/fuse.txt; \
    pip install -e .[fuse];

# create standalone binary
RUN set -ex; \
    pip install pyinstaller; \
    pyinstaller --log-level DEBUG -F -n borg-${BORG_ARCH} src/borg/__main__.py;

RUN ln -s "${BORG_BUILD_DIR}/borg-${BORG_ARCH}" /usr/bin/borg