Installing plugins on elasticsearch docker image using custom Dockerfile

Hello,
I want to install some plugins using the official elasticsearch docker image from: Official Elasticsearch docker image

Here is my Dockerfile

#!/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.

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

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