diff --git a/Dockerfiles/base/Dockerfile b/Dockerfiles/base/Dockerfile index d8ee938..eeaa00d 100644 --- a/Dockerfiles/base/Dockerfile +++ b/Dockerfiles/base/Dockerfile @@ -1,11 +1,11 @@ FROM debian:jessie MAINTAINER Kelvin Chen -# Install all dependencies that are used in multiple images -# to avoid wasting space. -RUN echo "deb http://httpredir.debian.org/debian jessie non-free" >> /etc/apt/sources.list && \ - apt-get update && \ - apt-get install --no-install-recommends -y \ +# Install all dependencies that are used in multiple images. +RUN echo "deb http://httpredir.debian.org/debian jessie non-free" \ + >> /etc/apt/sources.list \ + && apt-get update \ + && apt-get install --no-install-recommends -y \ vim \ ca-certificates \ python \ @@ -15,6 +15,6 @@ RUN echo "deb http://httpredir.debian.org/debian jessie non-free" >> /etc/apt/so nginx \ unzip \ unrar \ - supervisor && \ - apt-get clean && \ - rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* + supervisor \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* diff --git a/Dockerfiles/frontend/Dockerfile b/Dockerfiles/frontend/Dockerfile index a9fed09..18f172c 100644 --- a/Dockerfiles/frontend/Dockerfile +++ b/Dockerfiles/frontend/Dockerfile @@ -1,14 +1,10 @@ FROM kelvinchen/seedbox:base MAINTAINER Kelvin Chen -RUN apt-get update && \ - apt-get install --no-install-recommends -y apache2-utils && \ - apt-get clean && \ - rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* - -COPY nginx.conf common_default.conf ssl.conf /etc/nginx/ -COPY start / -COPY ssl-gen /usr/local/bin +RUN apt-get update \ + && apt-get install --no-install-recommends -y apache2-utils \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* VOLUME /config @@ -18,4 +14,8 @@ ENV USERNAME=user \ PASSWORD=hunter2 \ USE_SSL=false +COPY nginx.conf common_default.conf ssl.conf /etc/nginx/ +COPY start / +COPY ssl-gen /usr/local/bin + CMD ["/start"] diff --git a/Dockerfiles/openvpn/Dockerfile b/Dockerfiles/openvpn/Dockerfile index 4da18b7..07fd92f 100644 --- a/Dockerfiles/openvpn/Dockerfile +++ b/Dockerfiles/openvpn/Dockerfile @@ -8,7 +8,7 @@ RUN apt-get update \ easy-rsa \ iptables \ && apt-get clean \ - && rm -rf /var/lib/apt/lists/* + && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* WORKDIR /usr/share/easy-rsa diff --git a/Dockerfiles/plex/Dockerfile b/Dockerfiles/plex/Dockerfile index d47ea8f..42bf7b2 100644 --- a/Dockerfiles/plex/Dockerfile +++ b/Dockerfiles/plex/Dockerfile @@ -1,14 +1,16 @@ FROM kelvinchen/seedbox:base MAINTAINER Kelvin Chen -RUN curl -sL "https://plex.tv/downloads/latest/1?channel=8&build=linux-ubuntu-x86_64&distro=ubuntu&X-Plex-Token=" > /tmp/plex.deb && \ - dpkg -i /tmp/plex.deb && \ - apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* +RUN curl -sL "https://plex.tv/downloads/latest/1?channel=8&build=linux-ubuntu-x86_64&distro=ubuntu&X-Plex-Token=" > /tmp/plex.deb \ + && dpkg -i /tmp/plex.deb \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* + +VOLUME /config + +EXPOSE 32400 COPY plexmediaserver /etc/default/plexmediaserver COPY start Preferences.xml / -VOLUME /config -EXPOSE 32400 - CMD ["/start"] diff --git a/Dockerfiles/rtorrent/Dockerfile b/Dockerfiles/rtorrent/Dockerfile index e835b08..fa537fb 100644 --- a/Dockerfiles/rtorrent/Dockerfile +++ b/Dockerfiles/rtorrent/Dockerfile @@ -2,8 +2,8 @@ FROM kelvinchen/seedbox:base MAINTAINER Kelvin Chen # Install all dependencies -RUN apt-get update && \ - apt-get install -y --no-install-recommends \ +RUN apt-get update \ + && apt-get install -y --no-install-recommends \ rtorrent \ php5-fpm \ php5-cli \ @@ -18,23 +18,28 @@ RUN apt-get update && \ libdigest-perl \ libdigest-sha-perl \ libhtml-parser-perl \ - libarchive-zip-perl && \ - apt-get clean && \ - rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* + libarchive-zip-perl \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* # Configure/install r(u)torrent and autodl-irssi -RUN ln -s /config/rtorrent/rtorrent.rc ~/.rtorrent.rc && \ - git clone --depth=1 https://github.com/Novik/ruTorrent.git /opt/rutorrent && \ - git clone --depth=1 --recursive \ - https://github.com/autodl-community/autodl-irssi.git ~/.irssi/scripts && \ - mkdir -p ~/.irssi/scripts/autorun && \ - cp ~/.irssi/scripts/autodl-irssi.pl ~/.irssi/scripts/autorun +RUN ln -s /config/rtorrent/rtorrent.rc ~/.rtorrent.rc \ + && git clone --depth=1 \ + https://github.com/Novik/ruTorrent.git \ + /opt/rutorrent \ + && git clone --depth=1 --recursive \ + https://github.com/autodl-community/autodl-irssi.git \ + ~/.irssi/scripts \ + && mkdir -p ~/.irssi/scripts/autorun \ + && cp ~/.irssi/scripts/autodl-irssi.pl ~/.irssi/scripts/autorun VOLUME /config /torrents + +EXPOSE 80 49161 49161/udp 6881/udp + COPY start rtorrent.rc supervisord.conf autodl.cfg / COPY nginx.conf /etc/nginx/nginx.conf COPY rutorrent_config.php /opt/rutorrent/conf/config.php COPY irssi.cfg /root/.irssi/config -EXPOSE 80 49161 49161/udp 6881/udp CMD ["/start"] diff --git a/Dockerfiles/sickrage/Dockerfile b/Dockerfiles/sickrage/Dockerfile index 85921ca..a0fe469 100644 --- a/Dockerfiles/sickrage/Dockerfile +++ b/Dockerfiles/sickrage/Dockerfile @@ -1,11 +1,12 @@ FROM kelvinchen/seedbox:base MAINTAINER Kelvin Chen -RUN apt-get update && \ - apt-get install --no-install-recommends -y \ - python-cheetah && \ - git clone --depth=1 https://github.com/SiCKRAGETV/SickRage.git /opt/sickrage && \ - apt-get clean && rm -rf /var/lib/apt/lists/* +RUN apt-get update \ + && apt-get install --no-install-recommends -y python-cheetah \ + && git clone --depth=1 \ + https://github.com/SiCKRAGETV/SickRage.git \ + /opt/sickrage \ + && apt-get clean && rm -rf /var/lib/apt/lists/* VOLUME /config diff --git a/Dockerfiles/syncthing/Dockerfile b/Dockerfiles/syncthing/Dockerfile index bce964d..29ac43b 100644 --- a/Dockerfiles/syncthing/Dockerfile +++ b/Dockerfiles/syncthing/Dockerfile @@ -1,12 +1,13 @@ FROM kelvinchen/seedbox:base MAINTAINER Kelvin Chen -RUN curl -sL https://syncthing.net/release-key.txt | apt-key add - && \ - echo "deb http://apt.syncthing.net/ syncthing release" >> /etc/apt/sources.list.d/syncthing.list && \ - apt-get update && \ - apt-get install syncthing && \ - apt-get clean && \ - rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* +RUN curl -sL https://syncthing.net/release-key.txt | apt-key add - \ + && echo "deb http://apt.syncthing.net/ syncthing release" >> \ + /etc/apt/sources.list.d/syncthing.list \ + && apt-get update \ + && apt-get install syncthing \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* VOLUME /config diff --git a/build-all.sh b/build-all.sh index 49713c4..095930f 100755 --- a/build-all.sh +++ b/build-all.sh @@ -5,10 +5,10 @@ cd ${0%/*} -docker build -t kelvinchen/seedbox:base Dockerfiles/base -docker build -t kelvinchen/seedbox:frontend Dockerfiles/frontend -docker build -t kelvinchen/seedbox:plex Dockerfiles/plex -docker build -t kelvinchen/seedbox:rtorrent Dockerfiles/rtorrent -docker build -t kelvinchen/seedbox:sickrage Dockerfiles/sickrage -docker build -t kelvinchen/seedbox:syncthing Dockerfiles/syncthing -docker build -t kelvinchen/seedbox:openvpn Dockerfiles/openvpn +docker build -t kelvinchen/seedbox:base --pull Dockerfiles/base +docker build -t kelvinchen/seedbox:frontend Dockerfiles/frontend +docker build -t kelvinchen/seedbox:plex Dockerfiles/plex +docker build -t kelvinchen/seedbox:rtorrent Dockerfiles/rtorrent +docker build -t kelvinchen/seedbox:sickrage Dockerfiles/sickrage +docker build -t kelvinchen/seedbox:syncthing Dockerfiles/syncthing +docker build -t kelvinchen/seedbox:openvpn Dockerfiles/openvpn