Example compose that shows how to use OpenVPN.
Example compose that shows how to use Wireguard.
Example compose that allows for using IPv6 (and IPv4) over the VPN (but doesn't allow connecting to the VPN server over IPv6).
Example compose that allows for connecting to an VPN server over IPv6 (and IPv4).
In addition to this config, you also have to enable IPv6 support in the docker daemon (disabled by default).