docker-qbittorrent/Dockerfile
2024-05-25 21:20:46 +01:00

49 lines
1.3 KiB
Docker
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# syntax=docker/dockerfile:1
FROM ghcr.io/linuxserver/unrar:latest as unrar
FROM ghcr.io/linuxserver/baseimage-alpine:edge
# set version label
ARG BUILD_DATE
ARG VERSION
ARG QBITTORRENT_VERSION
ARG QBT_CLI_VERSION
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="thespad"
# environment settings
ENV HOME="/config" \
XDG_CONFIG_HOME="/config" \
XDG_DATA_HOME="/config"
# install runtime packages and qbitorrent-cli
RUN \
echo "**** install packages ****" && \
apk add --no-cache \
icu-libs \
p7zip \
python3 \
qt6-qtbase-sqlite && \
if [ -z ${QBITTORRENT_VERSION+x} ]; then \
QBITTORRENT_VERSION=$(curl -sL "http://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz" | tar -xz -C /tmp \
&& awk '/^P:qbittorrent-nox$/,/V:/' /tmp/APKINDEX | sed -n 2p | sed 's/^V://'); \
fi && \
apk add -U --upgrade --no-cache \
qbittorrent-nox==${QBITTORRENT_VERSION} && \
printf "Linuxserver.io version: ${VERSION}\nBuild-date: ${BUILD_DATE}" > /build_version && \
echo "**** cleanup ****" && \
rm -rf \
/root/.cache \
/tmp/*
# add local files
COPY root/ /
# add unrar
COPY --from=unrar /usr/bin/unrar-alpine /usr/bin/unrar
# ports and volumes
EXPOSE 8080 6881 6881/udp
VOLUME /config