[Django]-Docker for windows10 run django fail: Can't open file 'manage.py': [Errno 2] No such file or directory

4👍

I think you either missed this step: docker-compose run web django-admin.py startproject composeexample . or you’re using a directory that isn’t available to the Virtual Machine that is running docker.

If it works when you remove volumes: .:/code from the Compose file, then you know the issue is the volumes.

I believe by default only the users home directory is shared with the VM, so if you create a project outside of that tree, you won’t have access to the files from volumes.

Leave a comment