title: Docker-compose volume resetting when upgrading image
body: <p>I have a docker image of Grafana 8.0.5. I created a volume using <code>docker volume create grafana-storage</code></p>
  <p>I can stop the volume, and bring it back up with no data loss.</p>
  <p>However, if I update my docker-compose.yml to point to the latest version, 8.0.6, and re-run <code>docker-compose up -d</code> the volume goes back to a default install, losing any of my previously created dashboards, accounts, data sources, etc.</p>
  <p>As far as I understand, I shouldn't lose any data, since it should all be in the volume. How do you update images without resetting the volume</p>
  <p>docker-compose.yml:</p>
  <pre><code>version: &quot;3.3&quot;
  
  volumes:
    grafana-storage:
      external: true
  
  services:
  
    grafana:
      image: &quot;grafana/grafana:8.0.6&quot;
      container_name: &quot;grafana&quot;
      volumes:
        - &quot;grafana-storage:/usr/src/grafana&quot;
  </code></pre>
  <p>Docker Version:</p>
  <pre><code>Docker version 20.10.7, build f0df350
  </code></pre>
  <p>Docker-Compose Version:</p>
  <pre><code>docker-compose version 1.29.2, build 5becea4c
  </code></pre>
  <p>docker ps:</p>
  <pre><code>CONTAINER ID   IMAGE                   COMMAND                  CREATED          STATUS          PORTS                                           NAMES
  3fb6da4a8de9   grafana/grafana:8.0.6   &quot;/run.sh&quot;                17 minutes ago   Up 17 minutes   3000/tcp                                        grafana
  046892ab0a7b   traefik:v2.0            &quot;/entrypoint.sh --pr…&quot;   46 minutes ago   Up 23 minutes   80/tcp, 0.0.0.0:443-&gt;443/tcp, :::443-&gt;443/tcp   traefik
  </code></pre>
  <p>docker volume ls:</p>
  <pre><code>DRIVER    VOLUME NAME
  local     grafana-storage
  </code></pre>