title: How do I automatically update Grafana dashboards (and datasources) in the Docker Image from the exported JSON?
body: <p>I am attempting to update Grafana dashboards/data-sources automatically inside a Grafana Docker image using the exported relevant JSON which is stored (and routinely updated) in Github/Bitbucket. </p>
  
  <p>E.g.:</p>
  
  <ol>
  <li>Docker image running Grafana </li>
  <li>The Dockerfile adds a Bash script which pulls from a Git source, </li>
  <li>The script then copies the JSON files into the relevant directories (/etc/grafana/provisioning/datasource + /dashboards).</li>
  <li>Graphs and datasources are updated without the manual intervention (other than updating the JSON stored in Github or Bitbucket).</li>
  </ol>
  
  <p>I have EXEC'ed into the Grafana docker image and Grafana runs on a very basic linux system, therefore practically no commands can be used i.e., git, wget, apt. </p>
  
  <p>Would I be silly in thinking I should create a Dockerfile from the base Debian image, running an apt update and installing git inside. Then somehow running Grafana and the script inside that image?</p>
  
  <p>please feel free to ask for more information.</p>