From 3b4d40d0a5aac11f6d4f224586c342cf95d18ebc Mon Sep 17 00:00:00 2001 From: Ethan Paul <24588726+enpaul@users.noreply.github.com> Date: Thu, 12 Oct 2023 01:29:23 -0400 Subject: [PATCH] Add trivial containerfile for building borg --- Containerfile | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 Containerfile diff --git a/Containerfile b/Containerfile new file mode 100644 index 0000000..d9d2dff --- /dev/null +++ b/Containerfile @@ -0,0 +1,45 @@ +FROM docker.io/library/python:3.11 AS build + +RUN apt update --yes +RUN apt install --yes \ + libacl1-dev \ + libacl1 \ + libssl-dev \ + liblz4-dev \ + libzstd-dev \ + libxxhash-dev \ + build-essential \ + pkg-config \ + python3-pkgconfig \ + libfuse3-dev + +RUN python -m pip install \ + Cython==3.0.3 \ + pkgconfig==1.5.5 \ + --disable-pip-version-check \ + --upgrade + +# remember to add borg user to fuse group in final container + +COPY . /source + +RUN cd /source/borgbackup && python -m pip wheel .[pyfuse3] \ + --wheel-dir /wheels \ + --prefer-binary \ + --disable-pip-version-check + + +FROM docker.io/library/python:3.11-slim AS final + +COPY --from=build /wheels /wheels + +RUN python -m pip install borgbackup[pyfuse3] \ + --upgrade \ + --pre \ + --no-index \ + --no-cache-dir \ + --find-links /wheels \ + --disable-pip-version-check && \ + rm -rf /install/ + +ENTRYPOINT ["/bin/bash"]