I have several Microservices that each have a separate Docker container. It is in CS 2017, Docker Desktop for Windows. These services are talking each other using IP address that Docker assigned. The problem is that in Debug mode the project in Visual studio every time I change something and build the project the IP of docker is changing so I have to go through the code and change the IP, is there anyway to have a fix the IP or use static IP?
Asked
Active
Viewed 345 times
1 Answers
1
You should create a network for your project
docker network create myproject
Then when you run you docker containers give each of them a name
docker run --name service1 --net myproject service1image
Now other services also using same method. Now each service can reach other using the the name

Tarun Lalwani
- 142,312
- 9
- 204
- 265
-
actually I tried this before and I am getting this error: Error response from daemon: plugin not found – nik Sep 01 '17 at 17:20
-
I tried this before posting. Docker for Windows v17.06.0-ce and Hyper-V VM – Tarun Lalwani Sep 01 '17 at 17:51