communication between host to the docker and the docker to the host machine

I have 2 server apps - an MVC dotnet app and dotnet API. a dotnet mvc web app which runs on 8888 port locally and the api which runs on 8889 port locally. I have another 2 angular apps which runs on 4200 and 4300 ports in the containers and I use docker hub. I don't want to build the angular apps every time and I want to run on docker such a way that we don't have to run these angular apps every time. the constraint here is we load the angular app inside the mvc webapp iframe. I was able to load the angular app but I can't call the APIs from the angular app. i am able to run mvc app with the anulgar app loaded in the iFrame. MVC app will run on the host machine, angular apps run on docker. but the issue is the angular app in the docker is unable to hit the API on the host machine. the software i use here are visual studio, docket hub and visual studio code. tried different options - adding network mode to host and tried host.docker.internal, but it didn't work. - adding IP Address of the host and tried but it didn't work. - Creating a custom network on docker and tried but it didn't work. Is there a way to fix this issue? this is for the dev-setup, if we do it, it will help our dev team. need to run the angular app inside a mvc app which the angular runs on docker and mvc runs on the host machine. the angular needs to call the API which runs on the host machine.
1 Reply
Unknown User
Unknown User2w ago
Message Not Public
Sign In & Join Server To View
Want results from more Discord servers?
Add your server