❔ Docker and Visual Studio - ASP.NET Core projects
Hello. I've recently been assigned the task to split a very big Web Service into smaller services, so that I can containerize them and orchestrate them with K8s. I've successfully split them and now what I have is a solution, and each project in that solution Is a Web Service that does a specific task.
I've been experimenting with Docker and Visual Studio a bit, read some documentation, and gathered some questions that hopefully someone could help me understand better.
So the first question is about how I should organize the projects. My main concert is that, if there is going to be any problem with having a single repository in Git that contains the solution and all the projects inside, of if I should split them by solutions and have one repository for each. I understand that when I have the whole thing running, if I want to change the code of a service I only need a Docker Image so that K8s can deploy newer versions, but maybe someone knows better and how I currently have things organized could be an issue.
The second question is, I'm having trouble interacting with the services without them being run using Visual Studio. If I manually build a Docker Image (using the Dockerfile the Visual Studio generated), and then create and run a container using that image I created, yes it runs but I'm never able to interact with the service. When I run the
Third question is regarding the containers Visual Studio creates.
I've been experimenting with Docker and Visual Studio a bit, read some documentation, and gathered some questions that hopefully someone could help me understand better.
So the first question is about how I should organize the projects. My main concert is that, if there is going to be any problem with having a single repository in Git that contains the solution and all the projects inside, of if I should split them by solutions and have one repository for each. I understand that when I have the whole thing running, if I want to change the code of a service I only need a Docker Image so that K8s can deploy newer versions, but maybe someone knows better and how I currently have things organized could be an issue.
The second question is, I'm having trouble interacting with the services without them being run using Visual Studio. If I manually build a Docker Image (using the Dockerfile the Visual Studio generated), and then create and run a container using that image I created, yes it runs but I'm never able to interact with the service. When I run the
docker ps or docker containers ls --all command, and put 2 containers running side by side, one that I created and the other created by Visual Studio in either Debug or Release mode, The ones VS creates in the PORT column get mapped to a port on my local machine, where the one I created only shows the ports the container has exposed (80 and 443 in my case). So this is something I don't yet understand why is happening or how can I talk with the container.Third question is regarding the containers Visual Studio creates.