Ingest-attachment plugin installation within Dockerfile

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

FROM docker.elastic.co/elasticsearch/elasticsearch:6.7.0
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 sun.security.provider.Sun()
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
* java.security.SecurityPermission createAccessControlContext
* java.security.SecurityPermission insertProvider
* java.security.SecurityPermission putProviderProperty.BC
See http://docs.oracle.com/javase/8/docs/technotes/guides/security/permissions.html
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:

FROM docker.elastic.co/elasticsearch/elasticsearch:6.7.0

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
    ingest-attachment

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