How to Get the IP Address of a Docker Container
If you need to get the IP Address of a Docker Container, then you can do the following:
Option 1 – Connect to the Bridge Network Find out the network setup:
1 docker network ls Create a docker container and assign it to the bridge network:
1 docker run -dt <nginx> Get the information about the container:
1 docker ps Inspect the network:
1 docker network inspect bridge Now you can see the container IP Address.