From 14de862d98e8b02a31c49b735d11113002ded64a Mon Sep 17 00:00:00 2001 From: David Pilato Date: Thu, 14 Jun 2018 20:10:25 +0200 Subject: [PATCH 1/3] Describe how to add a plugin in Dockerfile When installing a plugin, people need to add the `--batch` option. It's better to document it as it could be a common use case. --- docs/reference/setup/install/docker.asciidoc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/reference/setup/install/docker.asciidoc b/docs/reference/setup/install/docker.asciidoc index 0e62fa207f6eb..7fd16d2d8a6fd 100644 --- a/docs/reference/setup/install/docker.asciidoc +++ b/docs/reference/setup/install/docker.asciidoc @@ -271,6 +271,14 @@ FROM docker.elastic.co/elasticsearch/elasticsearch:{version} COPY --chown=elasticsearch:elasticsearch elasticsearch.yml /usr/share/elasticsearch/config/ -------------------------------------------- +Also if you want to install a specific plugin, you can write a `Dockerfile` as follows: + +["source","sh",subs="attributes"] +-------------------------------------------- +FROM docker.elastic.co/elasticsearch/elasticsearch:{version} +RUN bin/elasticsearch-plugin ingest-attachment --batch +-------------------------------------------- + You could then build and try the image with something like: ["source","sh"] From a3b8d19ff9c3063b8317713312d1789fe302215d Mon Sep 17 00:00:00 2001 From: David Pilato Date: Thu, 14 Jun 2018 20:38:15 +0200 Subject: [PATCH 2/3] Fix text after review --- docs/reference/setup/install/docker.asciidoc | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/docs/reference/setup/install/docker.asciidoc b/docs/reference/setup/install/docker.asciidoc index 7fd16d2d8a6fd..a3e783468daba 100644 --- a/docs/reference/setup/install/docker.asciidoc +++ b/docs/reference/setup/install/docker.asciidoc @@ -271,14 +271,6 @@ FROM docker.elastic.co/elasticsearch/elasticsearch:{version} COPY --chown=elasticsearch:elasticsearch elasticsearch.yml /usr/share/elasticsearch/config/ -------------------------------------------- -Also if you want to install a specific plugin, you can write a `Dockerfile` as follows: - -["source","sh",subs="attributes"] --------------------------------------------- -FROM docker.elastic.co/elasticsearch/elasticsearch:{version} -RUN bin/elasticsearch-plugin ingest-attachment --batch --------------------------------------------- - You could then build and try the image with something like: ["source","sh"] @@ -287,6 +279,13 @@ docker build --tag=elasticsearch-custom . docker run -ti -v /usr/share/elasticsearch/data elasticsearch-custom -------------------------------------------- +Some plugins require additional security permissions. You have to explicitly accept +them either by attaching a tty when you run the Docker image and accepting yes at +the prompts, or inspecting the security permissions separately and if you are +comfortable with them adding the `--batch` flag to the plugin install command. +See {plugins}/_other_command_line_parameters.html[Plugin Management documentation] +for more details. + ===== D. Override the image's default https://docs.docker.com/engine/reference/run/#cmd-default-command-or-options[CMD] Options can be passed as command-line options to the {es} process by From be9c2a2d70926489ce024b4f16f0e53486371b52 Mon Sep 17 00:00:00 2001 From: David Pilato Date: Thu, 14 Jun 2018 21:02:40 +0200 Subject: [PATCH 3/3] Better formatting of tty --- docs/reference/setup/install/docker.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/reference/setup/install/docker.asciidoc b/docs/reference/setup/install/docker.asciidoc index a3e783468daba..b18f7c57a1668 100644 --- a/docs/reference/setup/install/docker.asciidoc +++ b/docs/reference/setup/install/docker.asciidoc @@ -280,7 +280,7 @@ docker run -ti -v /usr/share/elasticsearch/data elasticsearch-custom -------------------------------------------- Some plugins require additional security permissions. You have to explicitly accept -them either by attaching a tty when you run the Docker image and accepting yes at +them either by attaching a `tty` when you run the Docker image and accepting yes at the prompts, or inspecting the security permissions separately and if you are comfortable with them adding the `--batch` flag to the plugin install command. See {plugins}/_other_command_line_parameters.html[Plugin Management documentation]