Elasticsearch Issue on Grafana

I’m using docker Grafana now and I created the same two elasticsearch as “local elasticsearch running as service on ubuntu” and “grafana docker elasticsearch running on the container”. These two elasticsearch index, mapping and data are the same.
When I stop grafana docker elasticsearch and start local elasticsearch, I face this error on dashboard “scripts of type [inline], operation [aggs] and lang [groovy] are disabled”. If I delete metric script which is “(_value)/(1024*1024)”, error disappear.

Script info is;
Metric-Sum-Script (_value)/(1024*1024)

How can I fix that problem and What causes that?

Using Latest docker image,
Using Elasticseach;

Grafana docker elasticsearch info is:
{
“name” : “Beetle II”,
“cluster_name” : “elasticsearch”,
“cluster_uuid” : “tmDFSQZUSOqb4Hn5TLnzJw”,
“version” : {
“number” : “2.4.1”,
“build_hash” : “c67dc32e24162035d18d6fe1e952c4cbcbe79d16”,
“build_timestamp” : “2016-09-27T18:57:55Z”,
“build_snapshot” : false,
“lucene_version” : “5.5.2”
},
“tagline” : “You Know, for Search”
}

My Local elasticsearch info is :

{
“name” : “Blue Diamond”,
“cluster_name” : “elasticsearch”,
“cluster_uuid” : “enW2PA5pSZeoYFaYX6ibGg”,
“version” : {
“number” : “2.4.1”,
“build_hash” : “c67dc32e24162035d18d6fe1e952c4cbcbe79d16”,
“build_timestamp” : “2016-09-27T18:57:55Z”,
“build_snapshot” : false,
“lucene_version” : “5.5.2”
},
“tagline” : “You Know, for Search”
}

googling elasticsearch enable scripting docker gave me this as the top result:

Thak you, that was helpful.