File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,16 @@ docker network create elastic
12
12
PLUGINS_STR=` echo ${PLUGINS} | sed -e ' s/\n/ /g' `
13
13
MAJOR_VERSION=` echo ${STACK_VERSION} | cut -c 1`
14
14
15
+ PLUGIN_INSTALL_CMD=" "
16
+
17
+ if [ " x${PLUGINS_STR} " != " x" ]; then
18
+ ARRAY=(${PLUGINS_STR} )
19
+ for i in ${ARRAY}
20
+ do
21
+ PLUGIN_INSTALL_CMD+=" elasticsearch-plugin install --batch ${i} &&"
22
+ done
23
+ fi
24
+
15
25
# single node only
16
26
if [ " x${MAJOR_VERSION} " == ' x6' ]; then
17
27
docker run \
@@ -31,7 +41,7 @@ if [ "x${MAJOR_VERSION}" == 'x6' ]; then
31
41
--name=" es1" \
32
42
--entrypoint=" " \
33
43
docker.elastic.co/elasticsearch/elasticsearch:${STACK_VERSION} \
34
- /bin/sh -vc " elasticsearch-plugin install --batch ${PLUGINS_STR} && /usr/local/bin/docker-entrypoint.sh"
44
+ /bin/sh -vc " ${PLUGIN_INSTALL_CMD} /usr/local/bin/docker-entrypoint.sh"
35
45
elif [ " x${MAJOR_VERSION} " == ' x7' ]; then
36
46
docker run \
37
47
--rm \
@@ -52,7 +62,7 @@ elif [ "x${MAJOR_VERSION}" == 'x7' ]; then
52
62
--name=" es1" \
53
63
--entrypoint=" " \
54
64
docker.elastic.co/elasticsearch/elasticsearch:${STACK_VERSION} \
55
- /bin/sh -vc " elasticsearch-plugin install --batch ${PLUGINS_STR} && /usr/local/bin/docker-entrypoint.sh"
65
+ /bin/sh -vc " ${PLUGIN_INSTALL_CMD} /usr/local/bin/docker-entrypoint.sh"
56
66
fi
57
67
58
68
docker run \
You can’t perform that action at this time.
0 commit comments