title: docker exec sees changes in local files
body: <p>I am playing with django project in docker and reality of the situation contradicts my limited understanding:<br>
  after I change file tests.py and run<br>
  <code>docker exec {my_container} python manage.py test</code><br>
  it knows these local changes that I've made (for example I can write new test and it will run).<br>
  But I thought that docker containers are isolated and I need to recreate or at least copy updated file to one in order to update state of files.  </p>
  
  <p>I read <a href="https://docs.docker.com/engine/reference/commandline/exec/" rel="nofollow noreferrer">docker exec doc</a> but found no info about its ability to update files in container.<br>
  So, what do I need to know in order to understand what is happening?</p>
  
  <hr>
  
  <h2>EDIT</h2>
  
  <p>content of Dockerfile:  </p>
  
  <pre><code>FROM python:3
  ENV PYTHONUNBUFFERED 1
  RUN mkdir /code
  WORKDIR /code
  ADD . /code/
  RUN pip install -r requirements.txt
  </code></pre>
  
  <p>docker-compose.yml:</p>
  
  <pre><code>version: '3'
  services:
    ankete_db:
      image: postgres
      ports: 
        - "54320:5432"
      container_name: ankete_db
    ankete:
      build: .
      container_name: ankete
      command: gunicorn -b 0.0.0.0:8000 ankete.wsgi
      volumes:
        - .:/code
      ports:
        - "8000:8000"
      depends_on:
        - ankete_db
  </code></pre>