I am using Docker for Mac. I am running a nodejs based microservice in a Docker container. I want to test node microservice through the browser. How to get IP address of run
You can start your container with the flag -P. This "assigns" a random port to the exposed port of your image.
-P
With docker port you can see the randomly choosen port. Access is then possible via localhost:port.
docker port
localhost:port