'Unable to access the webapp from the docker container

I can run the webapp in the localhost without docker container enter image description here

I have created the docker image and started the container.

enter image description here

enter image description here

enter image description here

enter image description here

But I can't access the webapp from the docker container.

enter image description here



Solution 1:[1]

We might need to expose port from docker by -p parameter, otherwise, we can't access it outside.

From your information, we can try to expose 5005 port from container, because webapp3:v1 seems to use that port.

docker run ..... -p 5005:5005 .....

There is some description from Container networking

-p 5005:5005?Map TCP port 5005 in the container to port 5005 on the Docker host.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 D-Shih