Is there a command I can run to get the container's IP address right from the host after a new container is created?
Basically, once Docker creates the container, I want to roll my own code deployment and container configuration scripts.
Is there a command I can run to get the container's IP address right from the host after a new container is created?
Basically, once Docker creates the container, I want to roll my own code deployment and container configuration scripts.
If you forgot container ID or don't want to manipulate with shell commands, it's better to use UI like Portainer.
https://portainer.io/
There you can find all information about container also IP.
To get the IP address and host port of a container:
Output:
To get all container names and their IP addresses in just one single command.
If you are using
docker-compose
the command will be this:The output will be:
For windows 10:
Use:
Execute:
This will display active docker images:
Use the CONTAINER ID value:
"172.17.0.2"