# Ingest-attachment plugin installation within Dockerfile

**URL:** https://discuss.elastic.co/t/ingest-attachment-plugin-installation-within-dockerfile/178041
**Category:** Elasticsearch
**Tags:** docker
**Created:** [April 23, 2019, 12:15pm UTC](https://discuss.elastic.co/t/ingest-attachment-plugin-installation-within-dockerfile/178041 "2019-04-23T12:15:39Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![s0r1n](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/s0r1n/32/38302_2.png) [@s0r1n](https://discuss.elastic.co/u/s0r1n)
#### Post date: [April 23, 2019, 12:15pm UTC](https://discuss.elastic.co/t/ingest-attachment-plugin-installation-within-dockerfile/178041/1 "2019-04-23T12:15:40Z")

</div>

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](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?

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [April 23, 2019, 12:36pm UTC](https://discuss.elastic.co/t/ingest-attachment-plugin-installation-within-dockerfile/178041/2 "2019-04-23T12:36:38Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![s0r1n](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/s0r1n/32/38302_2.png) [@s0r1n](https://discuss.elastic.co/u/s0r1n)
#### Post date: [April 23, 2019, 2:15pm UTC](https://discuss.elastic.co/t/ingest-attachment-plugin-installation-within-dockerfile/178041/3 "2019-04-23T14:15:19Z")

</div>

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
```

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [May 21, 2019, 2:15pm UTC](https://discuss.elastic.co/t/ingest-attachment-plugin-installation-within-dockerfile/178041/4 "2019-05-21T14:15:23Z")

</div>

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