Configuring two containers networks

Looking for advice, guidance, and/or solutions (learning by example is how I learn best, so solutions preferred).

I’ve two containers:

I’m trying to spin up “kylemanna/docker-openvpn” and then spin up “fcwu/docker-ubuntu-vnc-desktop”.
The idea here is to use the openvpn container as a vpn connection while using the docker ubuntu vnc desktop container.

The first attempt I tried was running the openvpn container and then the ubuntu container, however I got stuck with choosing: Do I want the VPN to work and not be able to connect to the ubuntu container vs. Do I want the VPN to not work and be able to connect to the ubuntu container. (ubuntu container runs on localhost:6080 )

I’m stuck trying to figure out the end-to-end procedure for getting the ubuntu container to be able to connect to the vpn while also being able to connect to the localhost:6080 url.

U can run vnc container with --net container:docker-openvpn.

this procedure will allow you to use the openvpn container network in the vnc-ubuntu container.

see if it helps :wink: