# Which Dockerfile is used for the official image?

**URL:** <https://forum.opensearch.org/t/which-dockerfile-is-used-for-the-official-image/15834>\
**Category:** Build\
**Created:** [September 11, 2023, 6:52am UTC](https://forum.opensearch.org/t/which-dockerfile-is-used-for-the-official-image/15834 "2023-09-11T06:52:24Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![johnathan](https://avatars.discourse-cdn.com/v4/letter/j/67e7ee/32.png) [@johnathan](https://forum.opensearch.org/u/johnathan)\
**Post date:** [September 11, 2023, 6:52am UTC](https://forum.opensearch.org/t/which-dockerfile-is-used-for-the-official-image/15834/1 "2023-09-11T06:52:24Z")

</div>

**Versions** (relevant - OpenSearch/Dashboard/Server OS/Browser):  
2.9.0

**Describe the issue** :  
I wanted to check how the Docker image was built and searched for the Dockerfile used by Opensearch when building the official images  
I found one here:

> <https://github.com/opensearch-project/docker-images/blob/main/2.x/Dockerfile>

And other ones here:

> <https://github.com/opensearch-project/opensearch-build/tree/main/docker/release>
>
> //github.com/opensearch-project/opensearch-build/tree/main/docker/release

And more here:  
/opensearch-project/OpenSearch/tree/main/distribution/docker

So which one is actually being used?

---

<div class="post-metadata">

**Author:** ![radu.gheorghe](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/radu.gheorghe/32/3516_2.png) [@radu.gheorghe](https://forum.opensearch.org/u/radu.gheorghe)\
**Post date:** [September 15, 2023, 8:30am UTC](https://forum.opensearch.org/t/which-dockerfile-is-used-for-the-official-image/15834/2 "2023-09-15T08:30:54Z")

</div>

I’m pretty sure it’s the first one. The second link you provided is how the image is built.

If it helps, in DockerHub you can also see the layers of the image (effectively the Dockerfile commands). Here’s an example with latest: [Docker](https://hub.docker.com/layers/opensearchproject/opensearch/latest/images/sha256-7490e4c148dceb1ffbfa71f65e2e30f7c16c0049464d5a804596a20cfee51f11?context=explore)

---

<div class="post-metadata">

**Author:** ![johnathan](https://avatars.discourse-cdn.com/v4/letter/j/67e7ee/32.png) [@johnathan](https://forum.opensearch.org/u/johnathan)\
**Post date:** [September 17, 2023, 6:42pm UTC](https://forum.opensearch.org/t/which-dockerfile-is-used-for-the-official-image/15834/3 "2023-09-17T18:42:42Z")

</div>

All the links are for how the image is being built : ) But good tip about looking at the layers. I didn’t know about that. That would help in determining which Dockerfile was used.

Hopefully someone from opensearch reads this and makes this more clear as well

---

<div class="post-metadata">

**Author:** ![LHozzan](https://avatars.discourse-cdn.com/v4/letter/l/41988e/32.png) [@LHozzan](https://forum.opensearch.org/u/LHozzan)\
**Post date:** [October 24, 2023, 2:47pm UTC](https://forum.opensearch.org/t/which-dockerfile-is-used-for-the-official-image/15834/4 "2023-10-24T14:47:40Z")

</div>

Hi @radu.gheorghe .

I would like to made custom Docker image for our specific purpose (tune image for resource savings), where we need only few plugins, not all plugins from official image. As far as I know, persistent plugin installation/uninstallation is possible only in build time.  
I would like to evade approach with `init` container and do uninstallation every time, when pod in Kubernetes cluster is restarted and we will spending some valuable time to bring it back to live.

This [repository](https://github.com/opensearch-project/docker-images) looks abandon.  
This [repository](https://github.com/opensearch-project/opensearch-build/tree/main) looks maintained, but include bunch of information for not only OpenSearch. Or I miss it purpose?

And [this directory](https://github.com/opensearch-project/OpenSearch/tree/main/distribution/docker/src/docker) in main OpenSearch repository looks usable too.

So, my question is similar: **Which Docker file I can use as a template for the purpose?** I would like to stay closest to the official Docker images as is possible.

Thank you!

---

<div class="post-metadata">

**Author:** ![radu.gheorghe](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/radu.gheorghe/32/3516_2.png) [@radu.gheorghe](https://forum.opensearch.org/u/radu.gheorghe)\
**Post date:** [October 26, 2023, 2:23pm UTC](https://forum.opensearch.org/t/which-dockerfile-is-used-for-the-official-image/15834/5 "2023-10-26T14:23:22Z")

</div>

I think this is the one that generates official images: [https://github.com/opensearch-project/opensearch-build/tree/main/docker/release](https://github.com/opensearch-project/opensearch-build/tree/main/docker/release)

---

<div class="post-metadata">

**Author:** ![LHozzan](https://avatars.discourse-cdn.com/v4/letter/l/41988e/32.png) [@LHozzan](https://forum.opensearch.org/u/LHozzan)\
**Post date:** [October 27, 2023, 2:05pm UTC](https://forum.opensearch.org/t/which-dockerfile-is-used-for-the-official-image/15834/6 "2023-10-27T14:05:02Z")

</div>

OK, thank you, I will check it.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex019/uploads/mauve_hedgehog/original/2X/3/33547ea01a5b12dcca2958411d3edd97ae2ea8c1.png) [@system](https://forum.opensearch.org/u/system)\
**Post date:** [December 26, 2023, 2:05pm UTC](https://forum.opensearch.org/t/which-dockerfile-is-used-for-the-official-image/15834/7 "2023-12-26T14:05:42Z")

</div>

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