instead of "app" you could use the container IP :
sudo docker container inspect -f '{{ .NetworkSettings.IPAddress }}' app