Compare commits
25 Commits
22c8f29df0
...
v2.0.3
Author | SHA1 | Date | |
---|---|---|---|
9c11f1705c | |||
aad30fda0f | |||
3b63958dce | |||
d8a3cba654 | |||
844ac546e5 | |||
f121308163 | |||
581ee0ddf7 | |||
31a1ad4e72 | |||
f8ee0b97d6 | |||
a7a9d8da38 | |||
9f94cce6e1 | |||
f268698aa6 | |||
2ba53a33b6 | |||
7da161ce64 | |||
c4bec8ef22 | |||
b4c3060875 | |||
ea292b24e8 | |||
20f84970d1 | |||
457337130c | |||
7c3e0d4735 | |||
90c9790b60 | |||
3acc2ff6a0 | |||
21e25c0094 | |||
fc80e68287 | |||
898a44ec3c |
144
.drone.yml
144
.drone.yml
@@ -1,56 +1,104 @@
|
|||||||
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
type: docker
|
type: kubernetes
|
||||||
name: build
|
name: linux-amd64
|
||||||
|
platform:
|
||||||
|
os: linux
|
||||||
|
arch: amd64
|
||||||
|
node_selector:
|
||||||
|
kubernetes.io/arch: amd64
|
||||||
|
trigger:
|
||||||
|
event:
|
||||||
|
- tag
|
||||||
|
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
|
||||||
|
platform: 'linux/amd64'
|
||||||
|
|
||||||
|
---
|
||||||
|
kind: pipeline
|
||||||
|
type: kubernetes
|
||||||
|
name: linux-arm64
|
||||||
platform:
|
platform:
|
||||||
os: linux
|
os: linux
|
||||||
arch: arm64
|
arch: arm64
|
||||||
|
node_selector:
|
||||||
|
kubernetes.io/arch: arm64
|
||||||
trigger:
|
trigger:
|
||||||
event:
|
event:
|
||||||
- push
|
- tag
|
||||||
|
|
||||||
services:
|
|
||||||
- name: docker
|
|
||||||
image: docker:20.10.16-dind
|
|
||||||
privileged: true
|
|
||||||
environment:
|
|
||||||
DOCKER_TLS_CERTDIR: ""
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: docker-login
|
- name: docker
|
||||||
image: docker:20.10.16
|
image: plugins/docker
|
||||||
environment:
|
settings:
|
||||||
DOCKER_BUILDKIT: 1
|
dockerfile: docker/Dockerfile.arm64
|
||||||
DOCKER_HOST: tcp://docker:2375
|
username:
|
||||||
DOCKER_USERNAME:
|
from_secret: docker_username
|
||||||
from_secret: docker_username
|
password:
|
||||||
DOCKER_PASSWORD:
|
from_secret: docker_password
|
||||||
from_secret: docker_password
|
repo: bottledpills/deluge-openvpn
|
||||||
commands:
|
auto_tag: true
|
||||||
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
|
auto_tag_suffix: linux-arm64
|
||||||
|
platform: 'linux/arm64'
|
||||||
|
|
||||||
- name: create-builder
|
---
|
||||||
image: docker:20.10.16
|
kind: pipeline
|
||||||
environment:
|
type: kubernetes
|
||||||
DOCKER_BUILDKIT: 1
|
name: manifest-version
|
||||||
DOCKER_HOST: tcp://docker:2375
|
platform:
|
||||||
commands:
|
os: linux
|
||||||
- docker buildx create --use --name multi-builder || docker buildx use multi-builder
|
arch: arm64
|
||||||
|
node_selector:
|
||||||
- name: bootstrap
|
kubernetes.io/arch: arm64
|
||||||
image: docker:20.10.16
|
trigger:
|
||||||
environment:
|
event:
|
||||||
DOCKER_BUILDKIT: 1
|
- tag
|
||||||
DOCKER_HOST: tcp://docker:2375
|
steps:
|
||||||
commands:
|
- name: manifest-version
|
||||||
- docker buildx inspect --bootstrap
|
image: plugins/manifest
|
||||||
|
settings:
|
||||||
- name: build-push
|
spec: docker/manifest.version.tmpl
|
||||||
image: docker:20.10.16
|
username:
|
||||||
environment:
|
from_secret: docker_username
|
||||||
DOCKER_BUILDKIT: 1
|
password:
|
||||||
DOCKER_HOST: tcp://docker:2375
|
from_secret: docker_password
|
||||||
DOCKER_USERNAME:
|
auto_tag: true
|
||||||
from_secret: docker_username
|
ignore_missing: true
|
||||||
commands:
|
depends_on:
|
||||||
- docker buildx build --platform linux/amd64,linux/arm64 -t ${DOCKER_USERNAME}/deluge-openvpn:dev --push .
|
- linux-amd64
|
||||||
|
- linux-arm64
|
||||||
|
---
|
||||||
|
kind: pipeline
|
||||||
|
type: kubernetes
|
||||||
|
name: manifest-latest
|
||||||
|
platform:
|
||||||
|
os: linux
|
||||||
|
arch: amd64
|
||||||
|
node_selector:
|
||||||
|
kubernetes.io/arch: amd64
|
||||||
|
trigger:
|
||||||
|
event:
|
||||||
|
- tag
|
||||||
|
steps:
|
||||||
|
- name: manifest-latest
|
||||||
|
image: plugins/manifest
|
||||||
|
settings:
|
||||||
|
spec: docker/manifest.latest.tmpl
|
||||||
|
username:
|
||||||
|
from_secret: docker_username
|
||||||
|
password:
|
||||||
|
from_secret: docker_password
|
||||||
|
auto_tag: true
|
||||||
|
ignore_missing: true
|
||||||
|
depends_on:
|
||||||
|
- linux-amd64
|
||||||
|
- linux-arm64
|
@@ -1,7 +1,7 @@
|
|||||||
# OpenVPN and Deluge with WebUI
|
# OpenVPN and Deluge with WebUI
|
||||||
|
|
||||||
/badge.svg?branch=master)
|
[](https://drone.beatrice.wtf/bea/docker-deluge-openvpn)
|
||||||
[](https://hub.docker.com/r/ebrianne/docker-deluge-openvpn/)
|
[](https://hub.docker.com/r/bottledpills/deluge-openvpn/)
|
||||||
|
|
||||||
## Acknowledgments
|
## Acknowledgments
|
||||||
|
|
||||||
|
@@ -9,28 +9,12 @@ RUN apt-get update && apt-get -y install curl software-properties-common
|
|||||||
# Step 2: Add the Deluge PPA and update apt cache
|
# Step 2: Add the Deluge PPA and update apt cache
|
||||||
RUN add-apt-repository -u ppa:deluge-team/stable && apt-get update
|
RUN add-apt-repository -u ppa:deluge-team/stable && apt-get update
|
||||||
|
|
||||||
# Step 3: Download dumb-init asset based on architecture
|
# Step 3: Download dumb-init asset for amd64
|
||||||
RUN arch=$(dpkg --print-architecture) && \
|
RUN curl -Lo /tmp/dumb-init "$DUMB_INIT_BASE_URL/dumb-init_1.2.5_amd64.deb"
|
||||||
if [ "$arch" = "arm64" ]; then \
|
|
||||||
asset="dumb-init_1.2.5_aarch64"; \
|
|
||||||
elif [ "$arch" = "amd64" ]; then \
|
|
||||||
asset="dumb-init_1.2.5_amd64.deb"; \
|
|
||||||
else \
|
|
||||||
echo "Unsupported architecture: $arch" && exit 1; \
|
|
||||||
fi && \
|
|
||||||
echo "Downloading dumb-init asset: $asset" && \
|
|
||||||
curl -Lo /tmp/dumb-init "$DUMB_INIT_BASE_URL/$asset"
|
|
||||||
|
|
||||||
# Step 4: Install dumb-init based on asset type
|
# Step 4: Install dumb-init for amd64
|
||||||
RUN arch=$(dpkg --print-architecture) && \
|
RUN dpkg-deb -x /tmp/dumb-init /tmp/dumb-init-dir && \
|
||||||
if [ "$arch" = "amd64" ]; then \
|
cp /tmp/dumb-init-dir/usr/bin/dumb-init /usr/local/bin/dumb-init && \
|
||||||
dpkg-deb -x /tmp/dumb-init /tmp/dumb-init-dir && \
|
|
||||||
cp /tmp/dumb-init-dir/usr/bin/dumb-init /usr/local/bin/dumb-init; \
|
|
||||||
elif [ "$arch" = "amd64" ]; then \
|
|
||||||
cp /tmp/dumb-init /usr/local/bin/dumb-init; \
|
|
||||||
else \
|
|
||||||
echo "Unsupported architecture: $arch" && exit 1; \
|
|
||||||
fi && \
|
|
||||||
chmod +x /usr/local/bin/dumb-init && \
|
chmod +x /usr/local/bin/dumb-init && \
|
||||||
rm -rf /tmp/dumb-init /tmp/dumb-init-dir
|
rm -rf /tmp/dumb-init /tmp/dumb-init-dir
|
||||||
|
|
69
docker/Dockerfile.arm64
Normal file
69
docker/Dockerfile.arm64
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
FROM ubuntu:22.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 arm64
|
||||||
|
RUN curl -Lo /tmp/dumb-init "$DUMB_INIT_BASE_URL/dumb-init_1.2.5_aarch64"
|
||||||
|
|
||||||
|
# Step 4: Install dumb-init for arm64
|
||||||
|
RUN cp /tmp/dumb-init /usr/local/bin/dumb-init && \
|
||||||
|
chmod +x /usr/local/bin/dumb-init && \
|
||||||
|
rm -rf /tmp/dumb-init
|
||||||
|
|
||||||
|
# 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"]
|
10
docker/manifest.latest.tmpl
Normal file
10
docker/manifest.latest.tmpl
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
image: bottledpills/deluge-openvpn:latest
|
||||||
|
manifests:
|
||||||
|
- image: bottledpills/deluge-openvpn:latest-linux-amd64
|
||||||
|
platform:
|
||||||
|
architecture: amd64
|
||||||
|
os: linux
|
||||||
|
- image: bottledpills/deluge-openvpn:latest-linux-arm64
|
||||||
|
platform:
|
||||||
|
architecture: arm64
|
||||||
|
os: linux
|
10
docker/manifest.version.tmpl
Normal file
10
docker/manifest.version.tmpl
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
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}}-linux-amd64{{else}}latest-linux-amd64{{/if}}
|
||||||
|
platform:
|
||||||
|
architecture: amd64
|
||||||
|
os: linux
|
||||||
|
- image: bottledpills/deluge-openvpn:{{#if build.tag}}{{trimPrefix "v" build.tag}}-linux-arm64{{else}}latest-linux-arm64{{/if}}
|
||||||
|
platform:
|
||||||
|
architecture: arm64
|
||||||
|
os: linux
|
Reference in New Issue
Block a user