You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
1.2 KiB
43 lines
1.2 KiB
FROM centos:7
|
|
|
|
# Enable the EPEL Repository
|
|
RUN curl -o /tmp/epel-release-latest-7.noarch.rpm http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm \
|
|
&& rpm -Uvh /tmp/epel-release-latest-7.noarch.rpm \
|
|
# Update the system
|
|
&& yum update -y \
|
|
# Install rtorrent and expect (provides "unbuffer")
|
|
&& yum -y install rtorrent expect \
|
|
# Cleanup
|
|
&& yum clean all \
|
|
&& rm -rf /var/cache/yum \
|
|
# Create a directory to hold the data and the configuration
|
|
&& mkdir /torrent /etc/rtorrent
|
|
|
|
# Where leeched / seeded files are stored
|
|
VOLUME /torrent/download
|
|
|
|
# Where to drop .torrent files (will be picked up automatically by rtorrent)
|
|
VOLUME /torrent/incoming
|
|
|
|
# Where rtorrent stores its internal files
|
|
VOLUME /torrent/session
|
|
|
|
WORKDIR /torrent
|
|
|
|
# Standard Bittorrent Port
|
|
EXPOSE 6890/tcp
|
|
EXPOSE 6890/udp
|
|
|
|
# DHT Port
|
|
EXPOSE 6881/udp
|
|
|
|
# Standard configuration
|
|
ADD rtorrent.rc /etc/rtorrent.rc
|
|
ADD custom.rc /etc/rtorrent/custom.rc
|
|
|
|
# The unbuffer command is used as entrypoint to fake a tty.
|
|
# It is required since the daemon mode will only be available
|
|
# with rtorrent 0.9.7.
|
|
ENTRYPOINT [ "/bin/unbuffer" ]
|
|
CMD [ "/bin/rtorrent", "-n", "-o", "import=/etc/rtorrent.rc", "-o", "import=/etc/rtorrent/custom.rc" ]
|
|
|
|
|