'"Site cant be reached" error. When running Docker container

I am facing an error when running docker container on port 5000 on localhost. I deployed a fastapi Machine learning model and want to run it using docker container. Error:

This site can’t be reached
The web page at http://0.0.0.0:5000/ might be temporarily down or it may have moved permanently to a new web address.
ERR_ADDRESS_INVALID

Dockerfile:

FROM tiangolo/uvicorn-gunicorn-fastapi:python3.8
WORKDIR /app
COPY . /app
RUN pip install -r requirements.txt
EXPOSE 5000
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "5000"]

Command I am running for docker to build container:

docker build -t tags:latest .

Command to run docker container I am using:

docker run -p 5000:5000 tags:latest


Sources

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

Source: Stack Overflow

Solution Source