mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-09 00:52:30 -06:00
added Dockefile and entrypoint.sh
It uses the latest available version for libtorrent and builds both libtorrent and qBittorrent with Cmake + ninja The legal notice must be accepted trought an environment variable called LEGAL and passed to docker when the container is run, to set it true one must set "LEGAL=accept" PR #16828.
This commit is contained in:
committed by
GitHub
parent
b85b1e8834
commit
de8377ab53
37
dist/docker/Dockerfile
vendored
Normal file
37
dist/docker/Dockerfile
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
|
||||
FROM alpine:latest AS builder
|
||||
|
||||
ARG BUILD_TYPE
|
||||
ARG RELEASE
|
||||
|
||||
RUN if [ $RELEASE = "master" ] ; \
|
||||
then \
|
||||
wget https://github.com/qbittorrent/qBittorrent/archive/refs/heads/master.zip && \
|
||||
unzip master.zip && \
|
||||
cd qBittorrent-master ; \
|
||||
else \
|
||||
wget https://github.com/qbittorrent/qBittorrent/archive/refs/tags/release-${RELEASE}.tar.gz && \
|
||||
tar xf release-${RELEASE}.tar.gz && \
|
||||
cd qBittorrent-release-${RELEASE} ; \
|
||||
fi && \
|
||||
apk add --no-cache qt6-qttools-dev g++ libtorrent-rasterbar-dev cmake boost-dev ninja && \
|
||||
cmake -B build-nox -G "Ninja" -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DGUI=OFF -DQT6=ON -DSTACKTRACE=OFF && \
|
||||
cmake --build build-nox && \
|
||||
cmake --build build-nox --target install/strip
|
||||
|
||||
FROM alpine:latest
|
||||
|
||||
COPY --from=builder /usr/local/bin/qbittorrent-nox /usr/bin/qbittorrent-nox
|
||||
|
||||
COPY entrypoint.sh /entrypoint.sh
|
||||
|
||||
RUN chmod +x /entrypoint.sh && \
|
||||
apk add --no-cache qt6-qtbase libtorrent-rasterbar
|
||||
|
||||
ENV WEBUI_PORT="8080"
|
||||
|
||||
EXPOSE 6881 6881/udp 8080
|
||||
|
||||
VOLUME /config /downloads
|
||||
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
Reference in New Issue
Block a user