I have a flask script which I try to execute it via docker run command. Following command i am doing
docker run -dit -v /media/sf_MY_WINDOWS/GitRepo/:/ext/GitRepo -p 5000:5000 "isbhatt/prefixman:v1" /ext/docker/vm_scripts/db_loader.sh
and db_loader.sh file contains
/usr/local/bin/python2.7 /ext/SDSNG/src/prefix_manager/manage.py runserver --host 0.0.0.0 &
but when I do curl localhost:5000 Connection refused. If I go into container and run the stuff and do curl localhost:5000 it works in container.. What is wrong here?
Output of netstat -tln on container
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 0.0.0.0:5000 0.0.0.0:* LISTEN