title: Dockerfile can't copy & Docker-compose volume does not sync with container
body: <p>I am using Docker windows desktop client and trying to build a Flask python container. The dockerfile copies <code>requirements.txt</code> and <code>flask-script.py</code> files into python container and sets it up.</p>
  
  <pre><code>|-root directory (this is where the powershell commands are run from)
  |-docker-compose.yml
  |-src
  |  └── Dockerfile
  |  ├── flask-script.py
  |  ├── requirements.txt
  </code></pre>
  
  <p>Docker-compose.yml:</p>
  
  <pre><code>version: '3'
  
  services:
    flask-service:
      build: ./src
      volumes:
        - ./src:/usr/src/app
      ports:
        - 8080:80
  </code></pre>
  
  <p>src/Dockerfile:</p>
  
  <pre><code>FROM python:3
  
  COPY . /usr/src/app
  
  RUN pip install --no-cache-dir -r requirements.txt
  
  CMD [ "python", "./flask-script.py" ]
  </code></pre>
  
  <p>Running <code>docker-compose up</code> gives the following error:</p>
  
  <pre><code>ERROR: Could not open requirements file: [Errno 2] No such file or directory: 'requirements.txt'
  </code></pre>
  
  <p><strong>BUT If I change the dockerfile to:</strong></p>
  
  <pre><code>FROM python:3
  
  WORKDIR /usr/src/app
  
  COPY requirements.txt ./
  RUN pip install --no-cache-dir -r requirements.txt
  
  COPY . .
  
  CMD [ "python", "./flask-script.py" ]
  </code></pre>
  
  <p>It does work, however after the <code>docker-compose up</code> the volume specified in docker-compose does not sync with the container. If I make any changes to the <code>flask-script.py</code> file they are not seen by the container.</p>
  
  <p>What am I doing wrong?</p>