Docker-compose and ASP.NET Core application debug in Visual Studio

I have an ASP.NET Core application (.NET Core 3.1). I run it in Docker container through docker-compose. If I run it in console with command docker-compose up --build then all is ok, I can open application’s main page in browser at localhost:5005.
But when I run application with Visual Studio I can not accsess it in browser. After Visual Studio builds project it launchs my app in browser at url localhost:32769. But there is only empty page with message This site can’t be reached. I have no idea where Visual Studio reads port 32769 from because ports’ mapping my docker-compose.yml looks like

ports:
  - "5005:80"

How do I make Visual Studio to run application on proper port and then access app in browser?

Source: StackOverflow