How to publish a docker port on a Visual Studio project

Ngonidzashe Utete 1 Reputation point
2020-07-23T16:28:40.82+00:00

I created an ASP.NET core MVC project which uses MySQL database. When I debug using Docker, the project fails to connect to MySQL but if i change to IIS or Kestrel it connects. Is there a way to publish the MySQL port so that when I debug using Docker, it will connect to my DB

Azure Container Instances
Azure Container Instances
An Azure service that provides customers with a serverless container experience.
648 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,990 questions
{count} votes