# General Elastic Docker Image Questions

**URL:** <https://discuss.elastic.co/t/general-elastic-docker-image-questions/125087>\
**Category:** Elasticsearch\
**Created:** [March 21, 2018, 11:42pm UTC](https://discuss.elastic.co/t/general-elastic-docker-image-questions/125087 "2018-03-21T23:42:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![laubnyc](https://avatars.discourse-cdn.com/v4/letter/l/dc4da7/32.png) [@laubnyc](https://discuss.elastic.co/u/laubnyc)\
**Post date:** [March 21, 2018, 11:42pm UTC](https://discuss.elastic.co/t/general-elastic-docker-image-questions/125087/1 "2018-03-21T23:42:40Z")

</div>

Q1:

Trying to better understand the Elastic Docker images. E.g., if you were to build a container with

> docker pull [docker.elastic.co/elasticsearch/elasticsearch:6.2.3](http://docker.elastic.co/elasticsearch/elasticsearch:6.2.3)

This container could run indefinitely. Conversely, If you were to build a container with

> docker pull busybox #docker's "hello-world!"

the container would be created, "hello-world!" print to terminal, and the container stops. What's going on behind the scenes that prevents the elasticsearch container from stopping?

Q2:

I have customized ELK images that are passed into a multi-stage docker build. Once my later-stage containers are built (via my customized ELK images), is there any reason I would want to leave the earlier-stage containers running? If not, what would be the best way to stop these containers?

Thanks!

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [March 22, 2018, 5:29am UTC](https://discuss.elastic.co/t/general-elastic-docker-image-questions/125087/2 "2018-03-22T05:29:20Z")

</div>

> [@laubnyc](#):
>
> What's going on behind the scenes that prevents the elasticsearch container from stopping?

The java process that is Elasticsearch is running 🙂  
If for some reason it were to stop, like a bad config prevented it from fully starting up, then it would exit.

I can't answer the second question as it's not clear to me what's happening.

---

<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:** [April 19, 2018, 5:40am UTC](https://discuss.elastic.co/t/general-elastic-docker-image-questions/125087/3 "2018-04-19T05:40:50Z")

</div>

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