2024-10-25 19:20:55 -03:00
|
|
|
# It's easier to use miniconda or we'll have to build python-boost manually.
|
|
|
|
|
FROM continuumio/miniconda3:24.9.2-0
|
|
|
|
|
|
|
|
|
|
ENV DELUGE_APP=/opt/deluge
|
|
|
|
|
ENV DELUGE_CONFIG_DIR=/var/lib/deluge
|
2024-11-01 18:08:29 -03:00
|
|
|
ENV DELUGE_DOWNLOAD_DIR=${DELUGE_CONFIG_DIR}/downloads
|
|
|
|
|
ENV DELUGE_TORRENTFILE_DIR=${DELUGE_CONFIG_DIR}/downloads
|
|
|
|
|
ENV DELUGE_PLUGINS_DIR=${DELUGE_CONFIG_DIR}/plugins
|
|
|
|
|
|
2024-10-25 19:20:55 -03:00
|
|
|
ENV DELUGE_RPC_PORT=6890
|
|
|
|
|
ENV DELUGE_LISTEN_PORTS=6891,6892
|
2024-11-01 18:08:29 -03:00
|
|
|
ENV DELUGE_DAEMON_USERNAME=user
|
|
|
|
|
ENV DELUGE_DAEMON_PASSWORD=password
|
2024-12-05 08:53:45 -03:00
|
|
|
ENV DELUGE_LOG_LEVEL=debug
|
2024-12-11 15:34:57 -03:00
|
|
|
ENV DELUGE_NODE_ID='unset'
|
2024-10-25 19:20:55 -03:00
|
|
|
|
2024-11-01 18:08:29 -03:00
|
|
|
RUN mkdir -p ${DELUGE_APP} ${DELUGE_CONFIG_DIR}
|
2024-10-25 19:20:55 -03:00
|
|
|
WORKDIR ${DELUGE_APP}
|
|
|
|
|
|
|
|
|
|
# SHELL modifies the shell form to a login shell so we
|
|
|
|
|
# can autoactivate the conda env at every RUN command.
|
|
|
|
|
SHELL ["/bin/bash", "--login", "-c"]
|
|
|
|
|
|
|
|
|
|
RUN conda create -y -n 'deluge' python=3.8
|
|
|
|
|
|
|
|
|
|
# Populates the .bashrc so that conda is initialized
|
|
|
|
|
# and the proper env is activated before every call to RUN.
|
|
|
|
|
RUN conda init bash
|
|
|
|
|
RUN echo "conda activate deluge" > ~/.bashrc
|
|
|
|
|
|
2025-02-24 18:00:46 +02:00
|
|
|
RUN if [ $(uname -m) = "aarch64" ]; then \
|
|
|
|
|
conda install -y anaconda::py-boost \
|
|
|
|
|
anaconda::gxx_linux-aarch64 \
|
|
|
|
|
anaconda:openssl; \
|
|
|
|
|
else \
|
|
|
|
|
conda install -y anaconda::py-boost \
|
|
|
|
|
anaconda::gxx_linux-64 \
|
|
|
|
|
anaconda:openssl; \
|
|
|
|
|
fi
|
2024-10-25 19:20:55 -03:00
|
|
|
|
2024-12-05 20:52:23 -03:00
|
|
|
COPY . ./
|
2024-11-01 18:08:29 -03:00
|
|
|
|
2024-10-25 19:20:55 -03:00
|
|
|
RUN git submodule update --init --recursive &&\
|
|
|
|
|
cd vendor/libtorrent/bindings/python &&\
|
|
|
|
|
python setup.py build_ext install
|
|
|
|
|
|
|
|
|
|
RUN pip install .
|
|
|
|
|
|
|
|
|
|
ENTRYPOINT ["bash", "--login", "-c", "${DELUGE_APP}/docker/bin/start.sh"]
|