Skip to content

Commit 1b95ace

Browse files
authored
Added ES 6.8 and 7.6 Support (#205)
1 parent fd9a606 commit 1b95ace

File tree

4 files changed

+48
-0
lines changed

4 files changed

+48
-0
lines changed

images/elasticsearch/6.8/Dockerfile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
FROM docker.elastic.co/elasticsearch/elasticsearch:6.8.8
2+
3+
RUN echo "xpack.security.enabled: false" >> /usr/share/elasticsearch/config/elasticsearch.yml
4+
RUN echo "discovery.type: single-node" >> /usr/share/elasticsearch/config/elasticsearch.yml
5+
RUN bin/elasticsearch-plugin install -b analysis-icu && \
6+
bin/elasticsearch-plugin install -b analysis-phonetic
7+
8+
ADD docker-healthcheck.sh /docker-healthcheck.sh
9+
10+
HEALTHCHECK --retries=3 CMD ["bash", "/docker-healthcheck.sh"]
11+
12+
EXPOSE 9200 9300
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/bash
2+
set -eo pipefail
3+
4+
if health="$(curl -fsSL "http://${ES_HOST:-elasticsearch}:${ES_PORT:-9200}/_cat/health?h=status")"; then
5+
health="$(echo "$health" | sed -r 's/^[[:space:]]+|[[:space:]]+$//g')" # trim whitespace (otherwise we'll have "green ")
6+
if [ "$health" = 'green' ] || [ "$health" = 'yellow' ]; then
7+
exit 0
8+
fi
9+
echo >&2 "Unexpected health status: $health"
10+
fi
11+
12+
exit 1

images/elasticsearch/7.6/Dockerfile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
FROM docker.elastic.co/elasticsearch/elasticsearch:7.6.2
2+
3+
RUN echo "xpack.security.enabled: false" >> /usr/share/elasticsearch/config/elasticsearch.yml
4+
RUN echo "discovery.type: single-node" >> /usr/share/elasticsearch/config/elasticsearch.yml
5+
RUN bin/elasticsearch-plugin install -b analysis-icu && \
6+
bin/elasticsearch-plugin install -b analysis-phonetic
7+
8+
ADD docker-healthcheck.sh /docker-healthcheck.sh
9+
10+
HEALTHCHECK --retries=3 CMD ["bash", "/docker-healthcheck.sh"]
11+
12+
EXPOSE 9200 9300
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/bash
2+
set -eo pipefail
3+
4+
if health="$(curl -fsSL "http://${ES_HOST:-elasticsearch}:${ES_PORT:-9200}/_cat/health?h=status")"; then
5+
health="$(echo "$health" | sed -r 's/^[[:space:]]+|[[:space:]]+$//g')" # trim whitespace (otherwise we'll have "green ")
6+
if [ "$health" = 'green' ] || [ "$health" = 'yellow' ]; then
7+
exit 0
8+
fi
9+
echo >&2 "Unexpected health status: $health"
10+
fi
11+
12+
exit 1

0 commit comments

Comments
 (0)