Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Elasticsearch 7.16 and 7.17 #358

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions images/elasticsearch/7.16/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM docker.elastic.co/elasticsearch/elasticsearch:7.16.3

RUN echo "xpack.security.enabled: false" >> /usr/share/elasticsearch/config/elasticsearch.yml
RUN echo "discovery.type: single-node" >> /usr/share/elasticsearch/config/elasticsearch.yml
RUN bin/elasticsearch-plugin install -b analysis-icu && \
bin/elasticsearch-plugin install -b analysis-phonetic

ADD docker-healthcheck.sh /docker-healthcheck.sh
ADD docker-entrypoint.sh /docker-entrypoint.sh

HEALTHCHECK --retries=3 CMD ["bash", "/docker-healthcheck.sh"]

ENTRYPOINT ["/docker-entrypoint.sh"]

EXPOSE 9200 9300
12 changes: 12 additions & 0 deletions images/elasticsearch/7.16/docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash
set -eo pipefail

if [[ -n "$ES_PLUGINS" ]]; then
echo "Installing plugins: $ES_PLUGNS"
for PLUGIN in $ES_PLUGINS
do
./bin/elasticsearch-plugin install -b "$PLUGIN"
done
fi

/bin/bash /usr/local/bin/docker-entrypoint.sh
12 changes: 12 additions & 0 deletions images/elasticsearch/7.16/docker-healthcheck.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash
set -eo pipefail

if health="$(curl -fsSL "http://${ES_HOST:-elasticsearch}:${ES_PORT:-9200}/_cat/health?h=status")"; then
health="$(echo "$health" | sed -r 's/^[[:space:]]+|[[:space:]]+$//g')" # trim whitespace (otherwise we'll have "green ")
if [ "$health" = 'green' ] || [ "$health" = 'yellow' ]; then
exit 0
fi
echo >&2 "Unexpected health status: $health"
fi

exit 1
15 changes: 15 additions & 0 deletions images/elasticsearch/7.17/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM docker.elastic.co/elasticsearch/elasticsearch:7.17.8

RUN echo "xpack.security.enabled: false" >> /usr/share/elasticsearch/config/elasticsearch.yml
RUN echo "discovery.type: single-node" >> /usr/share/elasticsearch/config/elasticsearch.yml
RUN bin/elasticsearch-plugin install -b analysis-icu && \
bin/elasticsearch-plugin install -b analysis-phonetic

ADD docker-healthcheck.sh /docker-healthcheck.sh
ADD docker-entrypoint.sh /docker-entrypoint.sh

HEALTHCHECK --retries=3 CMD ["bash", "/docker-healthcheck.sh"]

ENTRYPOINT ["/docker-entrypoint.sh"]

EXPOSE 9200 9300
12 changes: 12 additions & 0 deletions images/elasticsearch/7.17/docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash
set -eo pipefail

if [[ -n "$ES_PLUGINS" ]]; then
echo "Installing plugins: $ES_PLUGNS"
for PLUGIN in $ES_PLUGINS
do
./bin/elasticsearch-plugin install -b "$PLUGIN"
done
fi

/bin/bash /usr/local/bin/docker-entrypoint.sh
12 changes: 12 additions & 0 deletions images/elasticsearch/7.17/docker-healthcheck.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash
set -eo pipefail

if health="$(curl -fsSL "http://${ES_HOST:-elasticsearch}:${ES_PORT:-9200}/_cat/health?h=status")"; then
health="$(echo "$health" | sed -r 's/^[[:space:]]+|[[:space:]]+$//g')" # trim whitespace (otherwise we'll have "green ")
if [ "$health" = 'green' ] || [ "$health" = 'yellow' ]; then
exit 0
fi
echo >&2 "Unexpected health status: $health"
fi

exit 1