Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
docker_notes:docker-deluge [2024-04-28 Sun wk17 11:13] – [s6 supervision rc system] baumkpdocker_notes:docker-deluge [2025-06-21 Sat wk25 13:00] (current) – [Compose file] baumkp
Line 1: Line 1:
-{{tag>linux docker image container init s6 s6-rc openvpn "docker compose" wireguard macvlan nftables}}+{{tag>linux docker image container openvpn "docker compose" wireguard macvlan nftables}}
 ======Docker Deluge Image / Service====== ======Docker Deluge Image / Service======
 I want a torrent service that uses a VPN and is set-up to block non VPN WAN (internet) access.  On my virtual machine implementation of this I used the following 3 packages: deluge (deluged with deluge-web), openvpn and nftables.  I have used both iptables and nftables and find nftables is definitely more elegant to use.  As far as I can tell there is not a Docker image that will meet my needs. I want a torrent service that uses a VPN and is set-up to block non VPN WAN (internet) access.  On my virtual machine implementation of this I used the following 3 packages: deluge (deluged with deluge-web), openvpn and nftables.  I have used both iptables and nftables and find nftables is definitely more elegant to use.  As far as I can tell there is not a Docker image that will meet my needs.
Line 103: Line 103:
   *To check external IP ''wget -qO - icanhazip.com'', reference from [[https://linuxnightly.com/check-external-ip-from-linux-command-line/|Check External IP From Linux Command Line]]   *To check external IP ''wget -qO - icanhazip.com'', reference from [[https://linuxnightly.com/check-external-ip-from-linux-command-line/|Check External IP From Linux Command Line]]
   *OpenVPN [[https://openvpn.net/community-resources/how-to/|2x HOW TO]] Look at troubleshooting   *OpenVPN [[https://openvpn.net/community-resources/how-to/|2x HOW TO]] Look at troubleshooting
 +
 +  *[[https://bbs.archlinux.org/viewtopic.php?id=300928|openvpn ERROR: Cannot open TUN/TAP dev /dev/net/tun: Operation not permitted (errno=1)]]
 +    *Add ''privileged: true'' after image in docker-compose.yml
 +    *Or  
 +<code>devices:
 +      - /dev/net/tun
 +      </code>
 +      
 =====docker external volumes===== =====docker external volumes=====
 There are 2 type of volume needs in this set up. There are 2 type of volume needs in this set up.
Line 176: Line 184:
 The docker build command to build the image was ''docker build -t deluge-openvpn-nftables .'' The docker build command to build the image was ''docker build -t deluge-openvpn-nftables .''
  
-The compose.yml file is: +I like a constant mac address on my private network.  Initially I start the docker container with the ''mac_address: '' directive commented out and then I copy the automatic created address into the directive to allow persistent common assign mac address. 
-<code>version: '3.9'+ 
 +++++The compose.yml file is:| 
 +<code yaml>---
 services: services:
   deluge:   deluge:
Line 185: Line 195:
     stdin_open: true     stdin_open: true
     container_name: deluge     container_name: deluge
 +    
     restart: 'unless-stopped' # always | no | on-failure [:5 (max-retries)]     restart: 'unless-stopped' # always | no | on-failure [:5 (max-retries)]
 +    
     volumes:     volumes:
       - '/mnt/docker_store/media/.config:/app/.config/deluge/'       - '/mnt/docker_store/media/.config:/app/.config/deluge/'
Line 191: Line 203:
       - '/mnt/deluge:/app/deluge'       - '/mnt/deluge:/app/deluge'
       - '/mnt/disk2/Media/Temp/Complete:/app/Complete'       - '/mnt/disk2/Media/Temp/Complete:/app/Complete'
 +    
     networks:      networks: 
       macnet1:       macnet1:
         ipv4_address: 192.168.1.98         ipv4_address: 192.168.1.98
 +        mac_address: 1e:xx:xx:xx:xx:xx
 +
     cap_add:     cap_add:
       - NET_ADMIN       - NET_ADMIN
 +
     command: /bin/sh     command: /bin/sh
 +
 +    devices:
 +      - /dev/net/tun
  
 networks: networks:
   macnet1:   macnet1:
     external: true</code>     external: true</code>
 +++++
 +
 Some basic docker compose commands: Some basic docker compose commands:
   *''docker-compose up -d'' to start up the container   *''docker-compose up -d'' to start up the container
Line 230: Line 251:
  
 A list of [[https://boxmatrix.info/wiki/BusyBox-Commands|BusyBox Commands]] A list of [[https://boxmatrix.info/wiki/BusyBox-Commands|BusyBox Commands]]
 +
 +====Shell Builtin Commands====
 +Many shells have builtin commands that can be listed with the command ''help''
 +
 +Some additional related commands:
 +  *''type command'' will return the command type, inbuilt or path to external command, or no entry if not found.
 +  *''whereis command'' return the path of external commands
 +
 +See: 
 +  *The Unix School [[https://www.theunixschool.com/2012/03/internal-vs-external-commands.html|Internal vs External commands]]
 +  *[[https://www.geeksforgeeks.org/internal-and-external-commands-in-linux/|Internal and External Commands in Linux]]
  
 =====References===== =====References=====