Unable to install kibana plugin in Dockerfile


(Nikhil Utane) #1

Hi, I am facing this annoying problem. I am not able to install the sentinl plugin inside Dockerfile.
I tried both online (http/https) and offline options.

FROM docker.elastic.co/kibana/kibana:6.3.1

COPY src/plugin/html_vis /usr/share/kibana/src/core_plugins/html_vis
USER root
RUN kibana-plugin install https://search.maven.org/remotecontent?filepath=com/floragunn/search-guard-kibana-plugin/6.3.1-14-beta-1/search-guard-kibana-plugin-6.3.1-14-beta-1.zip
RUN yum update -y && yum install -y git
RUN git clone https://github.com/dlumbrer/kbn_searchtables.git -b 6-dev plugins/kbn_searchtables

COPY src/plugin/TrafficLightVisKibana6 /usr/share/kibana/plugins/TrafficLightVisKibana6
COPY src/plugin/kibana-milestones-vis /usr/share/kibana/plugins/kibana-milestones-vis

#Option 1
RUN kibana-plugin install file:///home/airvana/sentinl-v6.3.1.zip

#Option 2
#RUN kibana-plugin install

#Option 3
#RUN kibana-plugin install https://github.com/sirensolutions/sentinl/releases/download/tag-6.4.2-0/sentinl-v6.3.1.zip

#RUN curl --silent --location https://rpm.nodesource.com/setup_8.x | bash - \
#    && yum install -y nodejs 

Docker output for option 1:

[airvana@node23 test]$ docker-compose -f docker-compose-kibana.yml build
Building kibana
Step 1/9 : FROM docker.elastic.co/kibana/kibana:6.3.1
 ---> 0bd7a7ea04f0
Step 2/9 : COPY src/plugin/html_vis /usr/share/kibana/src/core_plugins/html_vis
 ---> Using cache
 ---> 04aad555e60e
Step 3/9 : USER root
 ---> Using cache
 ---> 712d20eaaf6c
Step 4/9 : RUN kibana-plugin install https://search.maven.org/remotecontent?filepath=com/floragunn/search-guard-kibana-plugin/6.3.1-14-beta-1/search-guard-kibana-plugin-6.3.1-14-beta-1.zip
 ---> Using cache
 ---> d069cbeb74ac
Step 5/9 : RUN yum update -y && yum install -y git
 ---> Using cache
 ---> d9ea772593e8
Step 6/9 : RUN git clone https://github.com/dlumbrer/kbn_searchtables.git -b 6-dev plugins/kbn_searchtables
 ---> Using cache
 ---> 140315debdb8
Step 7/9 : COPY src/plugin/TrafficLightVisKibana6 /usr/share/kibana/plugins/TrafficLightVisKibana6
 ---> Using cache
 ---> d4581d2993c4
Step 8/9 : COPY src/plugin/kibana-milestones-vis /usr/share/kibana/plugins/kibana-milestones-vis
 ---> Using cache
 ---> 616766b59cfa
Step 9/9 : RUN kibana-plugin install file:///home/airvana/sentinl-v6.3.1.zip
 ---> Running in efc6be1a9b39
Attempting to transfer from file:///home/airvana/sentinl-v6.3.1.zip
Attempting to transfer from https://artifacts.elastic.co/downloads/kibana-plugins/file:///home/airvana/sentinl-v6.3.1.zip/file:///home/airvana/sentinl-v6.3.1.zip-6.3.1.zip
Error: Client request error: getaddrinfo ENOTFOUND artifacts.elastic.co artifacts.elastic.co:443
Plugin installation was unsuccessful due to error "Client request error: getaddrinfo ENOTFOUND artifacts.elastic.co artifacts.elastic.co:443"

The local file exists:

$ ls -l /home/airvana/sentinl-v6.3.1.zip
-rw-rw-r-- 1 airvana airvana 221514334 Oct  3 13:41 /home/airvana/sentinl-v6.3.1.zip

As a workaround, I am running the docker container without installing the plugin and then run the same commands after sshing to the kibana instance.

Any help appreciated. Thanks.


I think you have to copy your Zip in the container before the install command.