How to get the IP address of the docker host from inside a docker container -
is called as the title. I should be able to retrieve the IP address of the portmap of the container from the Dockers hosts and hosts, and should do this inside the container
/ sbin / ip route | Awk '/ default / {print $ 3}'
@MichaelNeale has noticed that there is no point in using this method in Dockerfile
(except when We should only need IP during this build time), because it will be IP hardcode during construction time.
Comments
Post a Comment