mirror of
https://github.com/MarkusMcNugen/docker-qBittorrentvpn
synced 2024-12-24 10:01:40 +00:00
removed supervisord, using baseimage-docker init system. added automatic port updates.
This commit is contained in:
parent
1154a0f510
commit
269cba4397
26
Dockerfile
26
Dockerfile
@ -19,24 +19,32 @@ RUN apt-get update
|
||||
RUN apt-get install -y transmission-cli
|
||||
RUN apt-get install -y transmission-common
|
||||
RUN apt-get install -y transmission-daemon
|
||||
RUN apt-get install -y supervisor
|
||||
RUN apt-get install -y openvpn
|
||||
RUN apt-get install -y curl
|
||||
RUN apt-get install -y screen
|
||||
|
||||
# Create directories
|
||||
RUN mkdir -p /var/log/supervisor
|
||||
# Transmission service
|
||||
RUN mkdir -p /etc/service/transmission/
|
||||
ADD transmission/run.sh /etc/service/transmission/run
|
||||
|
||||
# Transmission port updater
|
||||
RUN mkdir -p /etc/service/portupdater/
|
||||
ADD transmission/runUpdates.sh /etc/service/portupdater/run
|
||||
|
||||
# OpenVPN service
|
||||
RUN mkdir -p /etc/service/openvpn/
|
||||
ADD runOpenVpn.sh /etc/service/openvpn/run
|
||||
|
||||
# Add configuration and scripts
|
||||
ADD piaconfig/config.ovpn /etc/openvpn/config.ovpn
|
||||
ADD piaconfig/credentials.txt /etc/openvpn/credentials.txt
|
||||
ADD piaconfig/ca.crt /etc/openvpn/ca.crt
|
||||
ADD piaconfig/crl.pem /etc/openvpn/crl.pem
|
||||
ADD startOpenVPN.sh /etc/openvpn/start.sh
|
||||
ADD transmissionSettings.json /etc/transmission-daemon/settings.json
|
||||
ADD updateTransmissionPort.sh /etc/transmission-daemon/updatePort.sh
|
||||
ADD supervisord.conf /etc/supervisor/conf.d/supervisord.conf
|
||||
ADD runOpenVpn.sh /etc/openvpn/start.sh
|
||||
ADD transmission/transmissionSettings.json /etc/transmission-daemon/settings.json
|
||||
ADD transmission/updateTransmissionPort.sh /etc/transmission-daemon/updatePort.sh
|
||||
ADD transmission/periodicUpdates.sh /etc/transmission-daemon/periodicUpdates.sh
|
||||
|
||||
# Expose port and run supervisord
|
||||
# Expose port and run. Use baseimage-docker's init system
|
||||
EXPOSE 9091
|
||||
CMD ["/usr/bin/supervisord"]
|
||||
CMD ["/sbin/my_init"]
|
||||
|
@ -6,13 +6,13 @@ resolv-retry infinite
|
||||
nobind
|
||||
persist-key
|
||||
persist-tun
|
||||
ca ca.crt
|
||||
ca /etc/openvpn/ca.crt
|
||||
tls-client
|
||||
remote-cert-tls server
|
||||
auth-user-pass credentials.txt
|
||||
auth-user-pass /etc/openvpn/credentials.txt
|
||||
comp-lzo
|
||||
verb 1
|
||||
reneg-sec 0
|
||||
crl-verify crl.pem
|
||||
crl-verify /etc/openvpn/crl.pem
|
||||
|
||||
|
||||
|
3
runOpenVpn.sh
Executable file
3
runOpenVpn.sh
Executable file
@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
exec openvpn --config /etc/openvpn/config.ovpn
|
@ -1,4 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
cd /etc/openvpn/
|
||||
openvpn --config config.ovpn
|
8
transmission/periodicUpdates.sh
Executable file
8
transmission/periodicUpdates.sh
Executable file
@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
while [ 1 ]
|
||||
do
|
||||
sleep 1m
|
||||
/etc/transmission-daemon/updatePort.sh
|
||||
sleep 1m
|
||||
done
|
2
transmission/run.sh
Executable file
2
transmission/run.sh
Executable file
@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
exec /usr/bin/transmission-daemon -f -g /etc/transmission-daemon/
|
3
transmission/runUpdates.sh
Executable file
3
transmission/runUpdates.sh
Executable file
@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
exec /etc/transmission-daemon/periodicUpdates.sh
|
Loading…
Reference in New Issue
Block a user