Browse Source

Initial commit

master
David Ludwig 4 years ago
commit
e97b8eecb7
2 changed files with 28 additions and 0 deletions
  1. +25
    -0
      Dockerfile
  2. +3
    -0
      README.md

+ 25
- 0
Dockerfile View File

@ -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"

+ 3
- 0
README.md View File

@ -0,0 +1,3 @@
# qt-libtorrent-alpine
An Alpine Docker image consisting Qt and Libtorrent shared library builds without any unnecessary dependencies

Loading…
Cancel
Save