I have created a container from training/webapp image using the below command:
sudo docker run -d -p 5000:5000 training/webapp python app.py
I am able to access my “Hello World” website.
When I try to change the ports using the below command, the container created but the website is not accessible(I have already removed the old container).
sudo docker run -d -p 5001:5001 training/webapp python app.py
It seems, still the website is trying to listen on port 5000 only. And as there is no active container mapped to 5000, the access is enied.
Can someone help me in resolving this issue.