File tree Expand file tree Collapse file tree 4 files changed +43
-0
lines changed Expand file tree Collapse file tree 4 files changed +43
-0
lines changed Original file line number Diff line number Diff line change
1
+ FROM docker.elastic.co/elasticsearch/elasticsearch:7.9.3
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
+ ADD docker-entrypoint.sh /docker-entrypoint.sh
10
+
11
+ HEALTHCHECK --retries=3 CMD ["bash" , "/docker-healthcheck.sh" ]
12
+
13
+ ENTRYPOINT ["/docker-entrypoint.sh" ]
14
+
15
+ EXPOSE 9200 9300
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ set -eo pipefail
3
+
4
+ if [[ -n " $ES_PLUGINS " ]]; then
5
+ echo " Intalling plugins: $ES_PLUGNS "
6
+ for PLUGIN in $ES_PLUGINS
7
+ do
8
+ ./bin/elasticsearch-plugin install -b " $PLUGIN "
9
+ done
10
+ fi
11
+
12
+ /bin/bash /usr/local/bin/docker-entrypoint.sh
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change @@ -49,6 +49,10 @@ class GenerateEs extends Command
49
49
'real-version ' => '7.7.1 ' ,
50
50
'single-node ' => true ,
51
51
],
52
+ '7.9 ' => [
53
+ 'real-version ' => '7.9.3 ' ,
54
+ 'single-node ' => true ,
55
+ ],
52
56
];
53
57
54
58
/**
You can’t perform that action at this time.
0 commit comments