I'm currently learning Docker and django rest at the same time. When i run the command python3 manage.py runserver I can access to django admin page from http://localhost:8000/admin/, but when i run docker run -p 80:80 docker_django_tutorial the page is anccesible. (docker_django_tutorial is the name of my docker image) I guess i need to add somewhere python3 manage.py runserver in my dockerfile ?
Here is my Dockerfile:
#Use the Python3.7.2 container image
FROM python:3.7.2-stretch
WORKDIR /app
COPY . /app
RUN pip install -r requirements.txt
CMD ["python3", "manage.py", "runserver", "0.0.0.0:8000"]
and here my file requirements.txt:
Django==3.1.1
djangorestframework