commit e97b8eecb722fa9ab087b354658f402d6e0214bc Author: David Ludwig Date: Sat Apr 24 04:50:02 2021 -0500 Initial commit diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..9544412 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,25 @@ +ARG PREFIX=/opt/libtorrent + +FROM alpine as builder + +ARG PREFIX + +RUN apk add build-base python3 git linux-headers boost boost-build boost-dev + +WORKDIR /libtorrent +RUN git clone --recurse-submodules https://github.com/arvidn/libtorrent.git +RUN cd libtorrent &&\ + b2 variant=release cxxstd=17 link=shared runtime-link=shared -j 32 +RUN cd libtorrent && \ + b2 variant=release cxxstd=17 link=shared runtime-link=shared install --prefix=${PREFIX} + +# Create a new image with no dependencies and copy over the built files +FROM sirdavidludwig/qt-alpine:5.15.2 as qt-libtorrent-alpine + +ARG PREFIX + +COPY --from=builder ${PREFIX} ${PREFIX} + +ENV PATH "$PATH:${PREFIX}/bin" +ENV CPLUS_INCLUDE_PATH "$CPLUS_INCLUDE_PATH:${PREFIX}/include" +ENV LD_LIBRARY_PATH "$LD_LIBRARY_PATH:${PREFIX}/lib" diff --git a/README.md b/README.md new file mode 100644 index 0000000..c4ee4dd --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# qt-libtorrent-alpine + +An Alpine Docker image consisting Qt and Libtorrent shared library builds without any unnecessary dependencies