To dump data from Elasticsearch to local, I used elasticsearch-dump. Here are my notes.

https://github.com/elasticsearch-dump/elasticsearch-dump

By using the v option as shown below, files created in the container persist on the host side. The limit option and others are optional.

dockerrun[absolutepathofhostdirectory]:[absolutepathincontainer]-rm-tielasticdump/elasticsearch-dump-input[sourceElasticsearchindexendpoint]output=[absolutepathincontainer]/[outputfilename].json-limit10000

Specifically, it looks like the following.

dockerrun/Users/xxx/dump:/test-rm-tielasticdump/elasticsearch-dump-inputhttps://xxx.us-east-1.es.amazonaws.com/imagesoutput=test/images.json-limit10000

I hope this serves as a helpful reference.