24👍
✅
Your application only listens to requests coming from localhost, which in case of a container are requests coming from inside the container.
Try this compose file:
version: '3'
services:
web:
build: .
container_name: docker_django
command: python manage.py runserver 0.0.0.0:8000
volumes:
- .:/code
ports:
- "8000:8000"
corrected typo for port number as suggested
-1👍
What ended up working for me was:
- Stopping all docker instance
- Opening a command prompt in admin mode
- Executing the command ‘netsh winsock reset’
- Restarting the machine
- Restarting docker containers
- How to display the message passed to Http404 in a custom 404 Error template in Django?
- Django easy-thumbnails vs sorl-thumbnail differences
- Django File Upload and Rename
- Model limit_choices_to={'user': user}
Source:stackexchange.com