Files
docker-deluge-openvpn/Dockerfile.armhf
2020-10-10 14:04:31 +02:00

67 lines
2.6 KiB
Docker

ARG base_image=balenalib/raspberry-pi:buster
FROM $base_image
# For building on x86 machines. CircleCI un-comments before building
#RUN [ "cross-build-start" ]
VOLUME /data
VOLUME /config
# Update packages and install software
RUN apt-get update \
&& apt-get -y install apt-utils transmission-cli transmission-common transmission-daemon \
&& apt-get install -y dumb-init unzip p7zip-full p7zip openvpn curl ufw git tinyproxy jq bash \
&& apt-get -y upgrade \
&& curl -L -o /tmp/release.zip https://github.com/Secretmapper/combustion/archive/release.zip \
&& unzip /tmp/release.zip -d /opt/transmission-ui/ \
&& rm /tmp/release.zip \
&& git clone git://github.com/endor/kettu.git /opt/transmission-ui/kettu \
&& mkdir /opt/transmission-ui/transmission-web-control \
&& curl -sL `curl -s https://api.github.com/repos/ronggang/transmission-web-control/releases/latest | jq --raw-output '.tarball_url'` | tar -C /opt/transmission-ui/transmission-web-control/ --strip-components=2 -xz \
&& ln -s /usr/share/transmission/web/style /opt/transmission-ui/transmission-web-control \
&& ln -s /usr/share/transmission/web/images /opt/transmission-ui/transmission-web-control \
&& ln -s /usr/share/transmission/web/javascript /opt/transmission-ui/transmission-web-control \
&& ln -s /usr/share/transmission/web/index.html /opt/transmission-ui/transmission-web-control/index.original.html \
&& apt-get purge git \
&& apt-get autoremove --purge \
&& apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
&& groupmod -g 1000 users \
&& useradd -u 911 -U -d /config -s /bin/false abc \
&& usermod -G users abc
# Add configuration and scripts
ADD openvpn/ /etc/openvpn/
ADD transmission/ /etc/transmission/
ADD tinyproxy /opt/tinyproxy/
ADD scripts /etc/scripts/
ENV OPENVPN_USERNAME=**None** \
OPENVPN_PASSWORD=**None** \
OPENVPN_PROVIDER=**None** \
GLOBAL_APPLY_PERMISSIONS=true \
TRANSMISSION_HOME=/data/transmission-home \
CREATE_TUN_DEVICE=true \
ENABLE_UFW=false \
UFW_ALLOW_GW_NET=false \
UFW_EXTRA_PORTS= \
UFW_DISABLE_IPTABLES_REJECT=false \
PUID= \
PGID= \
DROP_DEFAULT_ROUTE= \
WEBPROXY_ENABLED=false \
WEBPROXY_PORT=8888 \
WEBPROXY_USERNAME= \
WEBPROXY_PASSWORD= \
DOCKER_LOG=false \
LOG_TO_STDOUT=false \
HEALTH_CHECK_HOST=google.com
HEALTHCHECK --interval=1m CMD /etc/scripts/healthcheck.sh
# Expose port and run
EXPOSE 9091
CMD ["dumb-init", "/etc/openvpn/start.sh"]
# For building on x86 machines. CircleCI un-comments before building
#RUN [ "cross-build-end" ]