title: Why I don't lose postgresql data when rebuild docker image?
body: <pre><code>version: '3'
  
  services:
    db:
      image: postgres
    web:
      build: .
      command: python3 manage.py runserver 0.0.0.0:8000
      volumes:
        - .:/code
      ports:
        - "8000:8000"
      depends_on:
        - db
  </code></pre>
  
  <p>Why I don't lose data when running <code>docker-compose build --force-em --no-cache</code>. If this is normal, why do we need to create volume for data folder ?</p>