概要
docker-comopseでElasticsearchを起動する際に複数プラグインをインストールする
docker-composeの書き方
version: "3.0"
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:x.x.x
...
command:
- /bin/sh
- -c
- "./bin/elasticsearch-plugin list | grep -q analysis-kuromoji
|| ./bin/elasticsearch-plugin install analysis-kuromoji;
./bin/elasticsearch-plugin list | grep -q analysis-icu
|| ./bin/elasticsearch-plugin install analysis-icu;
/usr/local/bin/docker-entrypoint.sh"
参考
Stackoverflow::How to install ElasticSeach plugins using docker compose