Skip to content

Commit

Permalink
Merge branch 'master' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
pkishino authored Apr 15, 2023
2 parents 0e23559 + d057f0a commit 0284aec
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 22 deletions.
43 changes: 41 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,55 @@ RUN apk --no-cache add curl jq \
&& 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

FROM ubuntu:22.04

FROM ubuntu:22.04 AS base

RUN set -ex; \
apt-get update; \
apt-get dist-upgrade -y; \
apt-get install -y --no-install-recommends \
tzdata \
iproute2 \
net-tools \
nano \
ca-certificates \
curl \
libcurl4-openssl-dev \
libdeflate-dev \
libevent-dev \
libfmt-dev \
libminiupnpc-dev \
libnatpmp-dev \
libpsl-dev \
libssl-dev

FROM base as TransmissionBuilder

ARG DEBIAN_FRONTEND=noninteractive

RUN apt-get update && apt-get install -y curl \
build-essential automake autoconf libtool pkg-config intltool libcurl4-openssl-dev \
libglib2.0-dev libevent-dev libminiupnpc-dev libgtk-3-dev libappindicator3-dev libssl-dev cmake xz-utils


RUN mkdir -p /home/transmission4/ && cd /home/transmission4/ \
&& curl -L -o transmission4.tar.xz "https://github.com/transmission/transmission/releases/download/4.0.3/transmission-4.0.3.tar.xz" \
&& tar -xf transmission4.tar.xz && cd transmission-4.0.3* && mkdir build && cd build \
&& cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo .. && make && make install


FROM base

VOLUME /data
VOLUME /config

COPY --from=TransmissionUIs /opt/transmission-ui /opt/transmission-ui
COPY --from=TransmissionBuilder /usr/local/bin /usr/local/bin
COPY --from=TransmissionBuilder /usr/local/share /usr/local/share

ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y \
dumb-init openvpn transmission-daemon transmission-cli privoxy \
dumb-init openvpn privoxy \
tzdata dnsutils iputils-ping ufw openssh-client git jq curl wget unrar unzip bc \
&& 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 \
Expand Down
19 changes: 0 additions & 19 deletions openvpn/ovpn/configure-openvpn.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,6 @@ cd /etc/openvpn/ovpn
find /etc/openvpn/ovpn -type f ! -name "*.sh" -delete

# Download and extract wanted bundle into temporary file
echo "Downloading OpenVPN config bundle into temporary file $tmp_file"
#svn not baked into docker, leave for another day
#svn export https://github.com/haugene/vpn-configs-contrib/tree/main/openvpn/"

#wget -c https://github.com/haugene/vpn-configs-contrib/archive/refs/heads/main.zip -P /tmp/
#echo "Extract OpenVPN config bundle into $VPN_PROVIDER_HOME"
#unzip /tmp/main.zip "vpn-configs-contrib-main/openvpn/ovpn/*" -d /tmp/
#mv /tmp/vpn-configs-contrib-main/openvpn/ovpn/* /etc/openvpn/ovpn
#rm /tmp/vpn-configs-contrib-main/openvpn/ovpn/ -R
#rm /tmp/main.zip


echo "creating temp folder"
mkdir /tmp/ovpnxtract/
Expand All @@ -59,14 +48,6 @@ mv /tmp/ovpnxtract/vpn-configs-contrib/openvpn/ovpn/* /etc/openvpn/ovpn
echo "deleting temp folder"
rm -rf /tmp/ovpnxtract/

#rm /tmp/vpn-configs-contrib-main/

#test repo
#wget -c https://github.com/derekcentrico/vpn-configs-contrib-ovpnwork/archive/refs/heads/main.zip -P /tmp/
#unzip /tmp/main.zip "vpn-configs-contrib-ovpnwork-main/openvpn/ovpn/*" -d /tmp/
#mv /tmp/vpn-configs-contrib-ovpnwork-main/openvpn/ovpn/* /etc/openvpn/ovpn
#rm /tmp/vpn-configs-contrib-ovpnwork-main/openvpn/ovpn/ -R



#pattern=$OVPN_CONNECTION.$OVPN_COUNTRY.$OVPN_CITY.$OVPN_PROTOCOL
Expand Down
4 changes: 3 additions & 1 deletion transmission/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,9 @@ else
fi

echo "STARTING TRANSMISSION"
exec su --preserve-environment ${RUN_AS} -s /bin/bash -c "/usr/bin/transmission-daemon ${TRANSMISSION_LOGGING} -g ${TRANSMISSION_HOME} --logfile $LOGFILE" &

exec su --preserve-environment ${RUN_AS} -s /bin/bash -c "/usr/local/bin/transmission-daemon ${TRANSMISSION_LOGGING} -g ${TRANSMISSION_HOME} --logfile $LOGFILE" &


# Configure port forwarding if applicable
if [[ -x /etc/openvpn/${OPENVPN_PROVIDER,,}/update-port.sh && (-z $DISABLE_PORT_UPDATER || "false" = "$DISABLE_PORT_UPDATER") ]]; then
Expand Down

0 comments on commit 0284aec

Please sign in to comment.