I have a vpn client container that seems to be working properly, it connects to the server and all that. I am trying to use it as my network for other containers but I am getting this error whenever I try to create the new containers:
"ERROR: for [container] Cannot create container for service [container]: conflicting options: host and and the network mode"
I am stumped because I originally had this working at one point. The first time I tried making this container all the other ones were able to connect to it successfully, but I had to recreate it trying to fix an unrelated issue and, without changing anything, this error showed up.
I have tried making new containers under different names and completely remaking the docker-compose and conf files, but it doesn't seem like anything is fixing the issue. I am unable to find a solution that works anywhere online.
Any help would be greatly appreciated, I don't know what else to try at this point, thank you!
Edit: adding compose files
vpn container:
version: "2.1" services: mullvad: image: linuxserver/wireguard container_name: mullvad hostname: mullvad cap_add: - NET_ADMIN - SYS_MODULE environment: - PUID=1000 - PGID=1000 - TZ=$TZ volumes: - ./config:/config - /lib/modules:/lib/modules ports: - 51820:51820/udp sysctls: - net.ipv6.conf.all.disable_ipv6=0 - net.ipv4.conf.all.src_valid_mark=1 restart: always networks: default: external: name: vpn
example container:
version: "2.1" services: qbittorrent: image: linuxserver/qbittorrent container_name: qbittorrent hostname: qbittorrent network_mode: container:$VPN_CONTAINER environment: - PUID=1000 - PGID=1000 - TZ=$TZ - UMASK_SET=022 - WEBUI_PORT=8080 volumes: - ./config:/config - ./downloads:/downloads ports: - 6881:6881 - 6881:6881/udp - 8080:8080 restart: unless-stopped