opendistro-for-elasticsearch / opendistro-build

🧰 Open Distro Build Scripts
https://opendistro.github.io/
Apache License 2.0
344 stars 175 forks source link

Cannot build Docker Image for OpenDistro 1.13.3 ElasticSearch 7.16.2 #801

Open chanwitkepha opened 2 years ago

chanwitkepha commented 2 years ago

Query What question do you have?

Cannot build Docker Image.

Expected Behavior Please describe the behavior you are expecting

git clone https://github.com/opendistro-for-elasticsearch/opendistro-build.git cd ~/opendistro-build/elasticsearch/docker

Then I use command OPENDISTRO_VERSION=1.13.3 ELASTIC_VERSION=7.16.2 make build Current Behavior What is the current behavior?

It show error : ADD failed: file not found in build context or excluded by .dockerignore: stat plugins: file does not exist

Relevant information Please include any relevant log snippets or files here.

Here is the output of build process. which show on screen

Removing intermediate container 3abaf3e58e32
 ---> 998d530902e3
Step 5/49 : RUN groupadd -g 1000 elasticsearch &&     adduser -u 1000 -g 1000 -d /usr/share/elasticsearch elasticsearch
 ---> Running in 0eb265578dfb
Removing intermediate container 0eb265578dfb
 ---> 934c63a03ab4
Step 6/49 : USER 1000
 ---> Running in 1cffb6aed724
Removing intermediate container 1cffb6aed724
 ---> 541b9c07c509
Step 7/49 : RUN rm -rf /tmp/plugins && mkdir /tmp/plugins
 ---> Running in 88e0a3c16298
Removing intermediate container 88e0a3c16298
 ---> 00e47118efd6
Step 8/49 : ADD plugins /tmp/plugins/
ADD failed: file not found in build context or excluded by .dockerignore: stat plugins: file does not exist
Error response from daemon: No such image: amazon/opendistro-for-elasticsearch:1.13.3
make: *** [Makefile:120: build] Error 1

When I check Dockerfile which locate in ~/opendistro-build/elasticsearch/docker/build/elasticsearch by VIM Editor It line 53 it have statement ADD plugins /tmp/plugins/

But when I check in folder ~/opendistro-build/elasticsearch/docker/build/elasticsearch. It don't have plugins folder.

chanwit@test-server-1012:~/opendistro-build/elasticsearch/docker/build/elasticsearch$ ls -l
total 28
drwxrwxr-x 2 chanwit chanwit 4096 Jan 31 06:38 bin
-rw-rw-r-- 1 chanwit chanwit  444 Jan 31 06:38 CENTOS_LICENSING.txt
-rw-rw-r-- 1 chanwit chanwit 8448 Jan 31 06:48 Dockerfile
-rw-rw-r-- 1 chanwit chanwit  508 Jan 31 06:38 elasticsearch.yml
-rw-rw-r-- 1 chanwit chanwit  285 Jan 31 06:38 log4j2.properties
chanwit@test-server-1012:~/opendistro-build/elasticsearch/docker/build/elasticsearch$