

As it’s a VM you should be fine as long as there’s enough resources for it to run its own docker instance. You just have to give it permission to control docker in the VM. And of course the VM must have docker.
Edit: it’s also possible to give it power over a remote docker instance as well. So you could do docker on the host PC and Nextcloud can manage it from the VM.
Duck DNS works great… Most of the time. If you cannot accept downtime multiple times a year, get yourself a domain and a service like cloud flare instead. DuckDNS is free and you get more than you pay for, but the bar is low when the cost is zero.