This will have more content added to it in the future.

Here we make use of an docker macvlan network and assign a IP to the container. We also mount Samba SMB resources using the local driver to the docker container. Using these CIFS and normal volume resources, we map their Volumes into the Transmission Torrent docker container.

For the volume stanza I did use the “long form syntax” or “long syntax”.

---
version: "3.9"

# https://hub.docker.com/r/linuxserver/transmission

services:
  bittorrent:
    image: lscr.io/linuxserver/transmission
    deploy:
      resources:
        limits:
          cpus: '7.0'
          memory: 8G
        reservations:
          cpus: '6.0'
          memory: 2G
    container_name: transmission
    hostname: torrent01
    domainname: domainname.home
    networks:
      dockerdmz01:
        ipv4_address: 192.168.1.10
        aliases:
         - torrent01.domainname.home
    dns:
      - 192.168.1.5
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=America/Chicago
      - TRANSMISSION_WEB_HOME=/combustion-release/ #optional
      - USER=user #optional
      - PASS=changeme #optional
      - WHITELIST=192.168.1.* #optional
      - PEERPORT=52800 #optional
      - HOST_WHITELIST=192.168.1.* #optional
      - BLOCKLIST_URL=https://github.com/DavidMoore/ipfilter/releases/download/lists/ipfilter.zip #trying
      - BLOCKLIST_ENABLED=true
    volumes:
      - type: volume
        source: complete
        target: /downloads/complete
      - type: volume
        source: incomplete
        target: /downloads/incomplete
      - type: volume
        source: watch
        target: /watch
      - type: volume
        source: config
        target: /config
    ports:
      - 9091:9091
      - 52800:52800
      - 52800:52800/udp
    cap_add:
      - SYS_NICE
    ulimits:
      nproc: 65535
      nofile:
        soft: 20000
        hard: 40000
    restart: unless-stopped

networks:
  dockerdmz01:   # externally created
    external: true

volumes:
  config:
  incomplete:
  complete:
    driver: local
    driver_opts:
      type: cifs
      o: addr=dataserver.domainname.home,username=torrent,password=changeme,vers=3.0,uid=1000,gid=1000
      device: //dataserver/TorrentComplete
  watch:
    driver: local
    driver_opts:
      type: cifs
      o: addr=dataserver.domainname.home,username=torrent,password=changeme,vers=3.0,uid=1000,gid=1000
      device: //dataserver/TorrentNew

The external network used in this ‘docker-compose.yml’ file would look like the following. Please note the MTU specification as that might not be what you are intending but if you need it, this might be one of three blog posts showing its use.

docker network create dockerdmz01 \
    --driver=macvlan \
    --subnet=192.168.1.32/27 \
    --gateway=192.168.1.33 \
    --ip-range=192.168.1.48/28 \
    --attachable \
    -o parent=eth0 \
    -o com.docker.network.mtu=9000

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.