Ingest-attachment plugin installation within Dockerfile

In order to install ingest-attachment plugin to a official elasticsearch docker image, here the Dockerfile to use:

RUN /usr/share/elasticsearch/bin/elasticsearch-plugin install --batch ingest-attachment

but after build the command curl -X GET 'http://elasticsearch:9200/_cat/plugins' returns nothing.

When the plugin is installed manually, it seems the installation succeeds in spite of the warnings:

# bin/elasticsearch-plugin install -b ingest-attachment
-> Downloading ingest-attachment from elastic
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.bouncycastle.jcajce.provider.drbg.DRBG (file:/usr/share/elasticsearch/lib/tools/plugin-cli/bcprov-jdk15on-1.61.jar) to constructor
WARNING: Please consider reporting this to the maintainers of org.bouncycastle.jcajce.provider.drbg.DRBG
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
@     WARNING: plugin requires additional permissions     @
* java.lang.RuntimePermission accessClassInPackage.sun.java2d.cmm.kcms
* java.lang.RuntimePermission accessDeclaredMembers
* java.lang.RuntimePermission getClassLoader
* java.lang.reflect.ReflectPermission suppressAccessChecks
* createAccessControlContext
* insertProvider
* putProviderProperty.BC
for descriptions of what these permissions allow and the associated risks.
-> Installed ingest-attachment

Why this warnings? How to check if the plugin is properly installed?

I think that you need to stop elasticsearch service and restart it. Because I think that this line:


Assumes that the service is already started.

As regards the warnings, could they be related to the jdk version? (if is too new or too old)
Is there any recommandation?

I figured out how to check if plugin is installed:

    [root@6397b9ae1ad9 elasticsearch]# elasticsearch-plugin list

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.