Custom Docker Image Install Plugin from Local file

Not able to install the plugin from local zip file. I followed the instructions in Official Doc but it didn't work. Do I have do it differently for docker image?

$ bin/kibana-plugin install file:///some/local/path/my-plugin.zip -d path/to/directory

DockerFile

FROM docker.elastic.co/kibana/kibana-oss:6.4.0
USER kibana
CMD ["/usr/local/bin/kibana-docker"]
RUN bin/kibana-plugin install file://Users/xxxx/kibana/search-guard-kibana-plugin-6.4.0-14.zip -d /usr/share/kibana/plugins
ADD kibana.yml /usr/share/kibana/config/kibana.yml

Error

Step 1/5 : FROM docker.elastic.co/kibana/kibana-oss:6.4.0
---> c8986fcd3caa
Step 2/5 : USER kibana
---> Running in 735a42f07097
Removing intermediate container 735a42f07097
---> 7c224d3155b5
Step 3/5 : CMD ["/usr/local/bin/kibana-docker"]
---> Running in bb9cc95a63d9
Removing intermediate container bb9cc95a63d9
---> b2a6875e818a
Step 4/5 : RUN bin/kibana-plugin install file://Users/xxxx/kibana/search-guard-kibana-plugin-6.4.0-14.zip -d /usr/share/kibana/plugins
---> Running in a9933a20492e
Attempting to transfer from file://Users/xxxx/kibana/search-guard-kibana-plugin-6.4.0-14.zip
Error: ENOTFOUND
Attempting to transfer from https://artifacts.elastic.co/downloads/kibana-plugins/file://Users/xxxx/kibana/search-guard-kibana-plugin-6.4.0-14.zip/file://Users/xxxx/kibana/search-guard-kibana-plugin-6.4.0-14.zip-6.4.0.zip
Plugin installation was unsuccessful due to error "No valid url specified."
The command '/bin/sh -c bin/kibana-plugin install file://Users/xxxx/kibana/search-guard-kibana-plugin-6.4.0-14.zip -d /usr/share/kibana/plugins' returned a non-zero code: 70

Does the local zip file exist in the docker image at the time you RUN that command? You'll probably have to ADD the plugin to the image before you can RUN the install command. The install command path would then be updated to read from the image's filesystem instead of your own

Thanks for quick reply.

You are right. I have to copy the zip to docker first and then install the plugin. Its working after I made following changes

ADD search-guard-kibana-plugin-6.4.0-14.zip /plugins/
RUN bin/kibana-plugin install file:///plugins/search-guard-kibana-plugin-6.4.0-14.zip

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