Search code examples
dockerelasticsearchdocker-composekibanaelastalert

Adding Plugin to Kibana Image in docker-compose.yml


I am new to using docker and trying to add the elastalert plugin to my kibana image. I am using Kibana 7.0.1 and Elasticsearch 7.0.1 and trying to use the elastalert 7.0.1 kibana plugin from github. When I run docker-compose up using the below docker-compose.yml file it does seem to install the plugin, but it doesn't actually start up kibana. Am I missing another command? Thanks

services:
    ...
    kibana:
        image: docker.elastic.co/kibana/kibana:7.0.1
        ...
        command: ./bin/kibana-plugin install https://github.com/bitsensor/elastalert-kibana-plugin/releases/download/1.0.4/elastalert-kibana-plugin-1.0.4-7.0.1.zip

Solution

  • So when you override command section you must remember to keep existing behavior which is set by image author.

    So in you case you can actually install kibana plugin this way but you must also add Kibana start at the end of the command by using e.g. && to run process after plugin installation. So in your case it should be:

         command: sh -c './bin/kibana-plugin install https://github.com/bitsensor/elastalert-kibana-plugin/releases/download/1.0.4/elastalert-kibana-plugin-1.0.4-7.0.1.zip && exec /usr/local/bin/kibana-docker'