Create an entrypoint file named docker-entrypoint-es2-plugins.sh to install useful plugins:
#!/bin/bash
# setting up prerequisites
# re-runs will give an error that is harmless:
# > ERROR: plugin directory /usr/share/elasticsearch/plugins/delete-by-query already exists.
# > To update the plugin, uninstall it first using 'remove delete-by-query' command
#plugin install delete-by-query
# https://github.com/mobz/elasticsearch-head/#running-as-a-plugin-of-elasticsearch
plugin install mobz/elasticsearch-head
# access it at /_plugin/elasticsearch-inquisitor/
plugin install polyfractal/elasticsearch-inquisitor
#exec /docker-entrypoint.sh elasticsearch
exec elasticsearch -Des.insecure.allow.root=true
Make sure to change the permissions to execute sh files:
chmod 744 *.sh
Start the service: docker-compose up
Open a browser to view the two plugins running on ES: