I'm having real troubles trying to get the ingest-attachment plugin working with docker via docker-compose.
I can get ES working without any plugins using the following YML file
version: '3'
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:6.6.1
container_name: elasticsearch
environment:
- cluster.name=docker-cluster
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- esdata1:/usr/share/elasticsearch/test_es/data
ports:
- 9200:9200
volumes:
esdata1:
driver: local
This starts as expected and can be seen from the output of docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
c4bbcfb01126 docker.elastic.co/elasticsearch/elasticsearch:6.6.1 "/usr/local/bin/dock…" 28 seconds ago Up 24 seconds 0.0.0.0:9200->9200/tcp, 9300/tcp elasticsearch
But as soon as I add in the plugin elasticsearch exits with code 0. I'm adding the plugging by using
command: bash -c "bin/elasticsearch-plugin install --batch ingest-attachment"
Here's the outupt of docker-compose -f example.yml up
elasticsearch    | -> Downloading ingest-attachment from elastic
elasticsearch    | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
elasticsearch    | @     WARNING: plugin requires additional permissions     @
elasticsearch    | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
elasticsearch    | * java.lang.RuntimePermission accessClassInPackage.sun.java2d.cmm.kcms
elasticsearch    | * java.lang.RuntimePermission accessDeclaredMembers
elasticsearch    | * java.lang.RuntimePermission getClassLoader
elasticsearch    | * java.lang.reflect.ReflectPermission suppressAccessChecks
elasticsearch    | * java.security.SecurityPermission createAccessControlContext
elasticsearch    | * java.security.SecurityPermission insertProvider
elasticsearch    | * java.security.SecurityPermission putProviderProperty.BC
elasticsearch    | See http://docs.oracle.com/javase/8/docs/technotes/guides/security/permissions.html
elasticsearch    | for descriptions of what these permissions allow and the associated risks.
elasticsearch    | -> Installed ingest-attachment
elasticsearch exited with code 0
So it seems to get through the install but then fails. Here's the full YML after the changes
version: '3'
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:6.6.1
command: bash -c "bin/elasticsearch-plugin install --batch ingest-attachment"
container_name: elasticsearch
environment:
- cluster.name=docker-cluster
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- esdata1:/usr/share/elasticsearch/test_es/data
ports:
- 9200:9200
volumes:
esdata1:
driver: local
Has anyone managed to get it working? 'm new to using Docker so I suspect I am doing something wrong but this was taken from some SO examples of plugins