elastic/support-diagnostics

building docker container fails

fgierlinger opened this issue · 3 comments

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.

cd ../docker
docker build -f Dockerfile -t support-diagnostics-app .

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.

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

@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.

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?