Skip to main content

Binding with Wireguard

version: "3.7"
services:
  wireguard:
    image: linuxserver/wireguard
    container_name: wireguard
    cap_add:
      - NET_ADMIN
      - SYS_MODULE
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/London
    volumes:
      - /home/tokugero/appdata/rdesktop/wg:/config
      - /lib/modules:/lib/modules
    ports:
      - 3389:3389
      - 4822:4822
    sysctls:
      - net.ipv4.conf.all.src_valid_mark=1
    restart: unless-stopped

  rdesktop:
    image: linuxserver/rdesktop
    container_name: rdesktop
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/London
    volumes:
      - /home/tokugero/appdata/rdesktop/rdesktop:/config
    restart: unless-stopped
    shm_size: "2gb"
    network_mode: "service:wireguard"

  guacd:
    image: linuxserver/guacd
    container_name: guacd
    restart: unless-stopped
    network_mode: "service:wireguard"

#####
# Below is only necessary for the actual html5 interface to connect to the guac daemon
#####
  guacamole:
    image: guacamole/guacamole
    container_name: guacamole
    environment:
      - GUACD_HOSTNAME=wireguard
      - MYSQL_HOSTNAME=guacdb
      - MYSQL_DATABASE=guac
      - MYSQL_USER=guac
      - MYSQL_PASSWORD=mypassword
    ports:
      - 9999:8080

  mariadb:
    image: linuxserver/mariadb
    container_name: guacdb
    environment:
      - MYSQL_ROOT_PASSWORD=myrootpassword
      - MYSQL_DATABASE=guac
      - MYSQL_USER=guac
      - MYSQL_PASSWORD=mypassword
    volumes:
      - /home/tokugero/appdata/rdesktop/guacdb:/config

 

docker exec -i guacdb mysql -uguac -pmypassword -Dguac -e "$(docker exec -it guacamole /opt/guacamole/bin/initdb.sh --mysql)"

 

image-1598025647897.png