I made a .net core WebApi and added docker to it via visual studio docker support.
Running my container via visual studio Run option works fine. What I want to do is run this container via batch so that I can access my app without having to run it in visual studio(so that it is always running) but I'm having some difficulties doing this.
For this I'm following this tutorial https://docs.docker.com/engine/examples/dotnetcore/ I have already tried changing my port a million times but without success. I have also searched my question online but could not find anything.
I have also tried removing the sslport from my config in my .net core application but when I do that the application doens't run via docker in visual studio anymore.
The command I'm using to run my image in a countainer is: docker run -it -d -p 65117:80 apiwithjwt:dev
What I expect is that if I surf to port 65117 I would get to see my webapplication.
When I type: docker container ls. This is what I get to see: https://i.stack.imgur.com/3DlzY.jpg On the top you see my container automatically made by visual studio and at the bottom you see the one I created with my command above. As you can see it seems like the port I added is missing something. My ports are comming from the this setting in the launchsettings.json
{
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:65118",
"sslPort": 44335
}
},
How can I pass the sslPort via my bash command? Or how can I remove the sslPort from my .net core application and still make it run correctly. Current result: Nothing to see when I surf to the port.