elastic / support-diagnostics

Support diagnostics utility for elasticsearch and logstash
Other
288 stars 154 forks source link

building docker container fails #515

Open fgierlinger opened 3 years ago

fgierlinger commented 3 years ago

Summary

Executing the docker-build.sh from the release package yields a /root/support-diagnostics-8.1.4/docker-build.sh: line 2: cd: ../docker: No such file or directory error.

The error can be traced back to the docker-buid.sh file. In line 2, there is a cd statement which only makes sense in the folder hierarchy of the github project.

https://github.com/elastic/support-diagnostics/blob/1d90e4cb905f3c124b47065d41d1c1677bfab127/scripts/docker-build.sh#L2-L3

When using the latest release file 8.1.4 the docker-build.sh file is directly in the root directory.

[root@host support-diagnostics-8.1.4]# pwd
/root/support-diagnostics-8.1.4
[root@host support-diagnostics-8.1.4]# ls -1
config
diagnostics.bat
diagnostics.sh
docker
docker-build.sh
export-monitoring.bat
export-monitoring.sh
import-monitoring.bat
import-monitoring.sh
lib
scrub.bat
scrub.sh

Solution Put the docker-build.sh file in the same location in the github repo and in the release package.

chason commented 3 years ago

After reviewing, it looks like this shell script isn't really necessary and what it does could be easily explained in the documentation instead.

fgierlinger commented 3 years ago

@chason Indeed. When building out of the root folder with docker build -f docker/Dockerfile -t support-diagnostics-app . the build succeed. It is mandatory to be inside the root folder, else the scripts are not copied into the container.

jbragdon1 commented 2 years ago

Just ran across this. Can confirm docker build -f docker/Dockerfile -t support-diagnostics-app . worked. Maybe a make file or a one line replacement for the bash script if documentation cannot be updated?