# Using elasticsearch-cli with docker exec (ES v 7.0.0)

**URL:** <https://discuss.elastic.co/t/using-elasticsearch-cli-with-docker-exec-es-v-7-0-0/179157>\
**Category:** Elasticsearch\
**Tags:** docker\
**Created:** [April 30, 2019, 10:04pm UTC](https://discuss.elastic.co/t/using-elasticsearch-cli-with-docker-exec-es-v-7-0-0/179157 "2019-04-30T22:04:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jeffkirk1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jeffkirk1/32/8080_2.png) [@jeffkirk1](https://discuss.elastic.co/u/jeffkirk1)\
**Post date:** [April 30, 2019, 10:04pm UTC](https://discuss.elastic.co/t/using-elasticsearch-cli-with-docker-exec-es-v-7-0-0/179157/1 "2019-04-30T22:04:45Z")

</div>

Howdy folks,

I can successfully start the SQL console client using this command:

docker exec -i $ELASTICSEARCH\_CONTAINER\_NAME /usr/share/elasticsearch/bin/elasticsearch-sql-cli

However, I ran into a problem with the proper terminal environment not being passed down to the console program, so I didn't have readline support (no up and down arrows, etc.).

I posted a question on this and then immediately came across the fix:

docker exec -it $ELASTICSEARCH\_CONTAINER\_NAME /usr/share/elasticsearch/bin/elasticsearch-sql-cli

That "t" after the "i" makes all the difference.

I hope you find this useful. I am a total noob to Docker exec functions, so it took some pain for me to discover this.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [May 28, 2019, 10:04pm UTC](https://discuss.elastic.co/t/using-elasticsearch-cli-with-docker-exec-es-v-7-0-0/179157/2 "2019-05-28T22:04:48Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
