From 17e7c7a7fade07cf4e0ca8ebb21a1975b5010de5 Mon Sep 17 00:00:00 2001 From: Mogeko Date: Thu, 18 Nov 2021 00:41:32 +0000 Subject: [PATCH] feat: local compilation Qbittorrent-Nox --- Dockerfile | 22 ++++++++++++++++++---- Makefile | 2 +- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 234018e..aa09f27 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,24 @@ -FROM alpine:edge +FROM alpine:edge as builder + +RUN apk add --no-cache boost-dev build-base clang qt5-qtbase-dev qt5-qttools-dev libtorrent-rasterbar-dev tar + +WORKDIR /workspace ARG VERSION -RUN apk add --no-cache \ - -X http://dl-cdn.alpinelinux.org/alpine/edge/testing \ - qbittorrent-nox=${VERSION} +ADD https://github.com/qbittorrent/qBittorrent/archive/refs/tags/release-${VERSION}.tar.gz /workspace + +RUN tar -zxf release-${VERSION}.tar.gz -C . \ + && mv qBittorrent-release-${VERSION}/* . \ + && ./configure --prefix=/workspace --disable-gui \ + && CC=clang make \ + && make install + +FROM alpine:edge + +RUN apk add --no-cache busybox libcrypto3 libgcc libstdc++ libtorrent-rasterbar musl qt5-qtbase zlib + +COPY --from=builder /workspace/bin/qbittorrent-nox /usr/bin/qbittorrent-nox ADD --chown=1000:100 root / diff --git a/Makefile b/Makefile index 6feec68..22cbc4e 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ CMD = /usr/bin/docker IMAGE = mogeko/qbittorrent -VERSION = 4.3.8-r0 +VERSION = 4.3.8 PORT = 8080 CONF_DIR = $(shell pwd)/example/config DL_DIR = $(shell pwd)/example/data