# Installing plugins on elasticsearch docker image using custom Dockerfile

**URL:** https://discuss.elastic.co/t/installing-plugins-on-elasticsearch-docker-image-using-custom-dockerfile/110931
**Category:** Elasticsearch
**Created:** [December 9, 2017, 11:58am UTC](https://discuss.elastic.co/t/installing-plugins-on-elasticsearch-docker-image-using-custom-dockerfile/110931 "2017-12-09T11:58:51Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Sarra\_Bouhenni](https://avatars.discourse-cdn.com/v4/letter/s/51bf81/32.png) [@Sarra\_Bouhenni](https://discuss.elastic.co/u/Sarra_Bouhenni)
#### Post date: [December 9, 2017, 11:58am UTC](https://discuss.elastic.co/t/installing-plugins-on-elasticsearch-docker-image-using-custom-dockerfile/110931/1 "2017-12-09T11:58:51Z")

</div>

Hello,  
I want to install some plugins using the official elasticsearch docker image from: [Official Elasticsearch docker image](http://docker.elastic.co/elasticsearch/elasticsearch:6.0.0)

Here is my Dockerfile

```auto
#!/bin/bash
FROM docker.elastic.co/elasticsearch/elasticsearch:5.5.2
USER root
# Copy scripts
COPY bin/ bin/

# Install search guard
RUN bin/elasticsearch-plugin install --batch com.floragunn:search-guard-5:5.5.2-16 \
	&& chmod +x \
		plugins/search-guard-5/tools/hash.sh \
		plugins/search-guard-5/tools/sgadmin.sh \
    	bin/init_sg.sh \
    	bin/entrypoint.sh \
    	bin/wait_until_started.sh

# Copy configuration
COPY config/ config/

# change user:group of the elasticsearch folder
RUN chown -R elasticsearch:elasticsearch /usr/share/elasticsearch

USER elasticsearch

ENTRYPOINT ["bin/entrypoint.sh"]

```

In my `entrypoint.sh` I execute a script to wait for elasticsearch to be running and then initialize the plugin I've already installed.  
My problem is that **ENTRYPOINT** command from Dockerfile overrides the entrypoint of the official command and using this Dockerfile, I see that Elasticsearch won't start at all. The solution I was given is to call `/run/entrypoint.sh` which is not present on my container [Answer on stackoverflow](https://stackoverflow.com/a/47671839/3980759).

Where can I find the preinstalled `entrypoint.sh` of elasticsearch docker image?

---

<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: [January 6, 2018, 11:58am UTC](https://discuss.elastic.co/t/installing-plugins-on-elasticsearch-docker-image-using-custom-dockerfile/110931/2 "2018-01-06T11:58:51Z")

</div>

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