2021年2月10日星期三

.NET Core 3.0 - Custom docker url being ignored

I need to have a docker container running with a specific custom url.

It needs to be the following:

localhost:9000/sample/  

I have defined this in my launchsettings.json file:

 "Docker": {          "commandName": "Docker",          "launchBrowser": true,          "launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}/sample/",          "publishAllPorts": true,          "httpPort": 9000      }  

But when I run the container and launch it in the browser, it always leaves out 'sample', and looks like this:

localhost:9000  

I tried using the following in launchsettiings.json instead:

 "Docker": {          "commandName": "Docker",          "launchBrowser": true,          "launchUrl": "http://localhost:9000/sample/",          "publishAllPorts": true,          "httpPort": 9000      }  

But it still launches with just localhost:9000

What am I missing here?

I am using Visual Studio 2019.

https://stackoverflow.com/questions/66093621/net-core-3-0-custom-docker-url-being-ignored February 08, 2021 at 06:09AM

没有评论:

发表评论