Public Repository

Last pushed: 6 months ago
Short Description
ElasticSearch image with the ReadOnlyRest plugin.
Full Description

This image is based in the official Elasticsearch image with the ReadOnlyRest
plugin installed.

It also provides an example addition to the base configuration file and a script
to generate API keys.

If used as provided, it is the same as the base ES image. To enable the plugin,
configuration must be set in config/elasticsearch.yml

One way is to create the config files with the keys once, and provide that
as configuration for the Docker image. If using API keys, you could do something
like.

$ docker run -it --rm -v $PWD:/usr/share/elasticsearch/config/result octobotdev/elasticsearch-readonlyrest bash
root@54688c686a82:/usr/share/elasticsearch# cat config/elasticsearch.yml.orig config/readonlyrest-examples/readonlyrest-config.yml > config/result/elasticsearch.yml && /bin/bash scripts/replace_keys.sh config/result/elasticsearch.yml
root@54688c686a82:/usr/share/elasticsearch# exit

That creates a base elasticsearch.yml file in the $PWD with three API keys:

  • one with read access,
  • one with data write access and
  • one with admin access.
    This keys are to be used in the X-Api-Key HTTP header.

An example Dockerfile to ship an image with that configuration file could be:

FROM octobotdev/elasticsearch-readonlyrest
COPY elasticsearch.yml config/elasticsearch.yml

More info available on the readonly rest plugin site.

Docker Pull Command
Owner
octobotdev

Comments (0)