I have a flask app, that i want to dockerize, so i have used the following Dockerfile
FROM python:3.8.0-alpine
WORKDIR /project
ADD . /project
RUN pip install -r requirements.txt
EXPOSE 5000
CMD ["python","application.py"]
I built the container with a tag:
docker build -t flask-sms-service:latest .
and run it with the following command:
docker run -d -p 5000:5000 flask-sms-service
I made sure to expose port 5000, for the server to be accessible. But when i access it on 127.0.0.1:5000
i can't access the container.
What did i do wrong?