Docker Community Forums

Share and learn in the Docker community.

No such file or directory when it is there

I have jenkins running in a container, where I try to install openjdk-11 to run my java project. I’ve added a jdk installer to global tools, it downloads and extracts it fine. However, then it fails to execute it with “no such file or directory” error, even though “ls” command shows it being present:

bash-4.4$ ls -la /var/jenkins_home/tools/hudson.model.JDK/openjdk-11/jdk-11/bin/javac
-rwxr-xr-x 1 jenkins jenkins 8784 Aug 23  2018 /var/jenkins_home/tools/hudson.model.JDK/openjdk-11/jdk-11/bin/javac
bash-4.4$ /var/jenkins_home/tools/hudson.model.JDK/openjdk-11/jdk-11/bin/javac
bash: /var/jenkins_home/tools/hudson.model.JDK/openjdk-11/jdk-11/bin/javac: No such file or directory

Both these from within container. I’ve attached volume with this option

-v $HOME/docker/volumes/jenkins-data:/var/jenkins_home

I feel like I’m missing something simple, but can’t figure out what.