Docker for windows10 run django fail: Can't open file 'manage.py': [Errno 2] No such file or directory
<p>I just start a sample django app. And use docker to run it. My docker image like:</p>

<pre><code>FROM python:3.5
ENV PYTHONUNBUFFERED 1
RUN mkdir /code
WORKDIR /code
ADD requirements.txt /code/
RUN pip install -r requirements.txt
ADD . /code/
</code></pre>

<p>My docker-compose.yml file:</p>

<pre><code>version: '2'
services:
  django:
    build: .
    command: python manage.py runserver 0.0.0.0:8000
    volumes:
      - .:/code
    ports:
      - "8000:8000"
</code></pre>

<p>When I run <code>docker-compose up</code> command,it build successfully but failed in running <code>command: python manage.py runserver 0.0.0.0:8000</code>,it complained <code>python: can't open file 'manage.py': [Errno 2] No such file or directory</code>.</p>

<p>Is this a bug in docker for windows? Because I just follow the docs of docker <a href="https://docs.docker.com/compose/django/" rel="nofollow">Quickstart: Docker Compose and Django</a></p>

<p>Thank for you help!</p>

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

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

<p>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.</p>

python django docker docker-compose cookiecutter-django