title: How I can update prometheus config file without losing data on docker
body: <p>I have an docker container running prometheus and sometimes I have to update an config file inside the container, the problem is that I don't know who I can update this file without deleting and creating the container again.</p>
  <pre><code> docker run --network=&quot;host&quot; -d --name=prometheus -p 9090:9090 -v ~/prometheus.yaml:/etc/prometheus/prometheus.yml  prom/prometheus --config.file=/etc/prometheus/prometheus.yml
  </code></pre>
  <p>I want to know how I can update the <strong>prometheus.yaml</strong> without deleting and creating again the docker container.</p>