Compare commits
23 Commits
ab23b35825
...
2ba53a33b6
Author | SHA1 | Date | |
---|---|---|---|
2ba53a33b6 | |||
7da161ce64 | |||
c4bec8ef22 | |||
b4c3060875 | |||
ea292b24e8 | |||
20f84970d1 | |||
457337130c | |||
7c3e0d4735 | |||
90c9790b60 | |||
3acc2ff6a0 | |||
21e25c0094 | |||
fc80e68287 | |||
898a44ec3c | |||
e8001b43d4 | |||
13fc4f61cc | |||
af7484183c | |||
8a1e4c9092 | |||
61facdcc76 | |||
15b922acca | |||
ef0c504e00 | |||
7df3678862 | |||
1dc35dd7ee | |||
ec3bce5731 |
70
.drone.yml
Normal file
70
.drone.yml
Normal file
@@ -0,0 +1,70 @@
|
|||||||
|
---
|
||||||
|
kind: pipeline
|
||||||
|
type: kubernetes
|
||||||
|
name: linux-amd64
|
||||||
|
platform:
|
||||||
|
os: linux
|
||||||
|
arch: amd64
|
||||||
|
trigger:
|
||||||
|
event:
|
||||||
|
- push
|
||||||
|
steps:
|
||||||
|
- name: docker
|
||||||
|
image: plugins/docker
|
||||||
|
settings:
|
||||||
|
dockerfile: docker/Dockerfile.amd64
|
||||||
|
username:
|
||||||
|
from_secret: docker_username
|
||||||
|
password:
|
||||||
|
from_secret: docker_password
|
||||||
|
repo: bottledpills/deluge-openvpn
|
||||||
|
auto_tag: true
|
||||||
|
auto_tag_suffix: linux-amd64
|
||||||
|
|
||||||
|
---
|
||||||
|
kind: pipeline
|
||||||
|
type: kubernetes
|
||||||
|
name: linux-arm64
|
||||||
|
platform:
|
||||||
|
os: linux
|
||||||
|
arch: arm64
|
||||||
|
trigger:
|
||||||
|
event:
|
||||||
|
- push
|
||||||
|
steps:
|
||||||
|
- name: docker
|
||||||
|
image: plugins/docker
|
||||||
|
settings:
|
||||||
|
dockerfile: docker/Dockerfile.arm64
|
||||||
|
username:
|
||||||
|
from_secret: docker_username
|
||||||
|
password:
|
||||||
|
from_secret: docker_password
|
||||||
|
repo: bottledpills/deluge-openvpn
|
||||||
|
auto_tag: true
|
||||||
|
auto_tag_suffix: linux-arm64
|
||||||
|
|
||||||
|
---
|
||||||
|
kind: pipeline
|
||||||
|
type: kubernetes
|
||||||
|
name: manifest
|
||||||
|
platform:
|
||||||
|
os: linux
|
||||||
|
arch: amd64
|
||||||
|
trigger:
|
||||||
|
event:
|
||||||
|
- push
|
||||||
|
steps:
|
||||||
|
- name: manifest
|
||||||
|
image: plugins/manifest
|
||||||
|
settings:
|
||||||
|
spec: docker/manifest.tmpl
|
||||||
|
username:
|
||||||
|
from_secret: docker_username
|
||||||
|
password:
|
||||||
|
from_secret: docker_password
|
||||||
|
auto_tag: true
|
||||||
|
ignore_missing: true
|
||||||
|
depends_on:
|
||||||
|
- linux-amd64
|
||||||
|
- linux-arm64
|
70
docker/Dockerfile.amd64
Normal file
70
docker/Dockerfile.amd64
Normal file
@@ -0,0 +1,70 @@
|
|||||||
|
FROM ubuntu:24.04
|
||||||
|
|
||||||
|
ARG DEBIAN_FRONTEND="noninteractive"
|
||||||
|
ENV DUMB_INIT_BASE_URL="https://github.com/Yelp/dumb-init/releases/download/v1.2.5"
|
||||||
|
|
||||||
|
# Step 1: Install prerequisites
|
||||||
|
RUN apt-get update && apt-get -y install curl software-properties-common
|
||||||
|
|
||||||
|
# Step 2: Add the Deluge PPA and update apt cache
|
||||||
|
RUN add-apt-repository -u ppa:deluge-team/stable && apt-get update
|
||||||
|
|
||||||
|
# Step 3: Download dumb-init asset for amd64
|
||||||
|
RUN curl -Lo /tmp/dumb-init "$DUMB_INIT_BASE_URL/dumb-init_1.2.5_amd64.deb"
|
||||||
|
|
||||||
|
# Step 4: Install dumb-init for amd64
|
||||||
|
RUN dpkg-deb -x /tmp/dumb-init /tmp/dumb-init-dir && \
|
||||||
|
cp /tmp/dumb-init-dir/usr/bin/dumb-init /usr/local/bin/dumb-init && \
|
||||||
|
chmod +x /usr/local/bin/dumb-init && \
|
||||||
|
rm -rf /tmp/dumb-init /tmp/dumb-init-dir
|
||||||
|
|
||||||
|
# Step 5: Install other dependencies
|
||||||
|
RUN apt-get -y install iputils-ping dnsutils bash jq net-tools openvpn curl ufw deluged deluge-web p7zip-full unrar unzip
|
||||||
|
|
||||||
|
# Step 6: Clean up apt cache and temporary files
|
||||||
|
RUN rm -rf /tmp/* /var/lib/apt/lists/* /var/tmp/*
|
||||||
|
|
||||||
|
# Step 7: Add the user "abc"
|
||||||
|
RUN groupmod -g 1000 users && \
|
||||||
|
useradd -u 911 -U -d /config -s /bin/false abc && \
|
||||||
|
usermod -G users abc
|
||||||
|
|
||||||
|
# Step 8: Copy configuration and scripts
|
||||||
|
COPY root/ /
|
||||||
|
|
||||||
|
# Step 9: Set environment variables
|
||||||
|
ENV OPENVPN_USERNAME=**None** \
|
||||||
|
OPENVPN_PASSWORD=**None** \
|
||||||
|
OPENVPN_PROVIDER=**None** \
|
||||||
|
GLOBAL_APPLY_PERMISSIONS=true \
|
||||||
|
TZ=Europe/Berlin \
|
||||||
|
DELUGE_WEB_PORT=8112 \
|
||||||
|
DELUGE_DEAMON_PORT=58846 \
|
||||||
|
DELUGE_DOWNLOAD_DIR=/download/completed \
|
||||||
|
DELUGE_INCOMPLETE_DIR=/download/incomplete \
|
||||||
|
DELUGE_TORRENT_DIR=/download/torrents \
|
||||||
|
DELUGE_WATCH_DIR=/download/watch \
|
||||||
|
CREATE_TUN_DEVICE=true \
|
||||||
|
ENABLE_UFW=false \
|
||||||
|
UFW_ALLOW_GW_NET=false \
|
||||||
|
UFW_EXTRA_PORTS= \
|
||||||
|
UFW_DISABLE_IPTABLES_REJECT=false \
|
||||||
|
PUID= \
|
||||||
|
PGID= \
|
||||||
|
UMASK=022 \
|
||||||
|
PEER_DNS=true \
|
||||||
|
PEER_DNS_PIN_ROUTES=true \
|
||||||
|
DROP_DEFAULT_ROUTE= \
|
||||||
|
HEALTH_CHECK_HOST=google.com \
|
||||||
|
LOG_TO_STDOUT=false \
|
||||||
|
DELUGE_LISTEN_PORT_LOW=53394 \
|
||||||
|
DELUGE_LISTEN_PORT_HIGH=53404 \
|
||||||
|
DELUGE_OUTGOING_PORT_LOW=63394 \
|
||||||
|
DELUGE_OUTGOING_PORT_HIGH=63404
|
||||||
|
|
||||||
|
# Step 10: Configure health check and expose ports
|
||||||
|
HEALTHCHECK --interval=1m CMD /etc/scripts/healthcheck.sh
|
||||||
|
EXPOSE 8112 58846
|
||||||
|
|
||||||
|
# Step 11: Set default command
|
||||||
|
CMD ["/usr/local/bin/dumb-init", "/etc/openvpn/init.sh"]
|
@@ -1,28 +1,37 @@
|
|||||||
FROM ubuntu:22.04
|
FROM ubuntu:24.04
|
||||||
|
|
||||||
ARG DEBIAN_FRONTEND="noninteractive"
|
ARG DEBIAN_FRONTEND="noninteractive"
|
||||||
|
ENV DUMB_INIT_BASE_URL="https://github.com/Yelp/dumb-init/releases/download/v1.2.5"
|
||||||
|
|
||||||
# Install prerequisites and curl
|
# Step 1: Install prerequisites
|
||||||
RUN apt-get update && apt-get -y install curl software-properties-common && \
|
RUN apt-get update && apt-get -y install curl software-properties-common
|
||||||
add-apt-repository -u ppa:deluge-team/stable && \
|
|
||||||
apt-get update && \
|
# Step 2: Add the Deluge PPA and update apt cache
|
||||||
# Download and install dumb-init manually based on architecture
|
RUN add-apt-repository -u ppa:deluge-team/stable && apt-get update
|
||||||
arch=$(dpkg --print-architecture) && \
|
|
||||||
if [ "$arch" = "arm64" ]; then arch="aarch64"; fi && \
|
# Step 3: Download dumb-init asset for arm64
|
||||||
curl -Lo /tmp/dumb-init.deb "https://github.com/Yelp/dumb-init/releases/download/v1.2.5/dumb-init_1.2.5_${arch}.deb" && \
|
RUN curl -Lo /tmp/dumb-init "$DUMB_INIT_BASE_URL/dumb-init_1.2.5_aarch64"
|
||||||
dpkg -i /tmp/dumb-init.deb && rm -f /tmp/dumb-init.deb && \
|
|
||||||
# Install other dependencies
|
# Step 4: Install dumb-init for arm64
|
||||||
apt-get -y install iputils-ping dnsutils bash jq net-tools openvpn curl ufw deluged deluge-web p7zip-full unrar unzip && \
|
RUN cp /tmp/dumb-init /usr/local/bin/dumb-init && \
|
||||||
echo "Cleanup" && \
|
chmod +x /usr/local/bin/dumb-init && \
|
||||||
rm -rf /tmp/* /var/lib/apt/lists/* /var/tmp/* && \
|
rm -rf /tmp/dumb-init
|
||||||
echo "Adding user" && \
|
|
||||||
groupmod -g 1000 users && \
|
# Step 5: Install other dependencies
|
||||||
|
RUN apt-get -y install iputils-ping dnsutils bash jq net-tools openvpn curl ufw deluged deluge-web p7zip-full unrar unzip
|
||||||
|
|
||||||
|
# Step 6: Clean up apt cache and temporary files
|
||||||
|
RUN rm -rf /tmp/* /var/lib/apt/lists/* /var/tmp/*
|
||||||
|
|
||||||
|
# Step 7: Add the user "abc"
|
||||||
|
RUN groupmod -g 1000 users && \
|
||||||
useradd -u 911 -U -d /config -s /bin/false abc && \
|
useradd -u 911 -U -d /config -s /bin/false abc && \
|
||||||
usermod -G users abc
|
usermod -G users abc
|
||||||
|
|
||||||
# Add configuration and scripts
|
# Step 8: Copy configuration and scripts
|
||||||
COPY root/ /
|
COPY root/ /
|
||||||
|
|
||||||
|
# Step 9: Set environment variables
|
||||||
ENV OPENVPN_USERNAME=**None** \
|
ENV OPENVPN_USERNAME=**None** \
|
||||||
OPENVPN_PASSWORD=**None** \
|
OPENVPN_PASSWORD=**None** \
|
||||||
OPENVPN_PROVIDER=**None** \
|
OPENVPN_PROVIDER=**None** \
|
||||||
@@ -52,9 +61,9 @@ ENV OPENVPN_USERNAME=**None** \
|
|||||||
DELUGE_OUTGOING_PORT_LOW=63394 \
|
DELUGE_OUTGOING_PORT_LOW=63394 \
|
||||||
DELUGE_OUTGOING_PORT_HIGH=63404
|
DELUGE_OUTGOING_PORT_HIGH=63404
|
||||||
|
|
||||||
|
# Step 10: Configure health check and expose ports
|
||||||
HEALTHCHECK --interval=1m CMD /etc/scripts/healthcheck.sh
|
HEALTHCHECK --interval=1m CMD /etc/scripts/healthcheck.sh
|
||||||
|
|
||||||
# Deluge Deamon and web
|
|
||||||
EXPOSE 8112 58846
|
EXPOSE 8112 58846
|
||||||
|
|
||||||
CMD ["/usr/local/bin/dumb-init", "/etc/openvpn/init.sh"]
|
# Step 11: Set default command
|
||||||
|
CMD ["/usr/local/bin/dumb-init", "/etc/openvpn/init.sh"]
|
12
docker/manifest.tmpl
Normal file
12
docker/manifest.tmpl
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
image: bottledpills/deluge-openvpn:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}}
|
||||||
|
manifests:
|
||||||
|
-
|
||||||
|
image: bottledpills/deluge-openvpn:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-amd64
|
||||||
|
platform:
|
||||||
|
architecture: amd64
|
||||||
|
os: linux
|
||||||
|
-
|
||||||
|
image: bottledpills/deluge-openvpn:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm64
|
||||||
|
platform:
|
||||||
|
architecture: arm64
|
||||||
|
os: linux
|
Reference in New Issue
Block a user