And how do you run the nextcloud container? Did you forwarded the port correctly? Did you check container logs? What exactly do you get when trying to access it from browser? If it is a white page that probably means the port works, otherwise the browser gives you an error message.
When you share commands or configs about how you ran the container, follow this guide to format your post: How to format your forum posts