How to specify --network container:<name|id> for custom docker apps?

solit

Cadet
Joined
Feb 25, 2024
Messages
4
I would like to have one single app route all its traffic via a VPN.
To achieve this I'd like to use 2 containers (A:VpnClient and B:MyApp) where B uses the network of A.
The 2 containers run seperately just fine, both set up as custom apps. Now I just need the network sharing as well :)

Here's how I'd specify it with docker compose:
Code:
services:
    vpn:
        cap_add:
            - NET_ADMIN
        ports:
            - '5800:5800'  # Port for 'app' container

    app:
        network_mode: service:vpn
        depends_on:
          - vpn


I simply don't know how to define this in the custom app networking section... or anywhere else for that matter:
1709042322529.png


I'm running TrueNAS-SCALE-24.04-BETA.1 on a HP ProLiant Gen8 Microserver with 10GB RAM

So far I have decided against trying the following things:
- Creating a bridge on my NIC. I did that in an attempt to set up wireguard (wg-easy) and encountered some issues with the K8 cluster to the point where I could not remove the bridge again later. Since I have the non-custom apps running nicely on K8 without any bridges now, I'd rather not mess with it, if I can avoid it.
In theory I'd have a 2nd NIC I could use for this, but setting that up cleanly for this purpose is not something I know how to do.

- Forcing docker-compose on the system. The docker-in-docker setup simply does not strike me as particularly desirable so far. I would like to stick to supported solutions as closely as possible. Also, since my server is on the lower end in terms of performance, as much as I can I'd like to keep it simple :)

Hopefully y'all have some good solutions?
Thanks in advance!
 

solit

Cadet
Joined
Feb 25, 2024
Messages
4
It looks like my custom apps pop up under [zfs pool mount]/ix-applications/releases. Has anyone successfully modified things there?
My assumption is that modifying a chart here could be the easiest way to have a solution with low overhead. However, I'm still trying to understand the setup and haven't yet found the values of my deployment via UI.

I've checked out TrueCharts as well, but since it comes with so many additional components that I figure just tweaking the ix charts a bit would be easier (on the system's resources).
 
Top