在我的容器上,我共享了一个包含java的卷。但是当我试图在我的容器上使用它时,bash说java找不到...你知道为什么吗?
[root@mymachine~]# docker exec -ti agent1 /bin/bash
6a8618f52c72:/home/jenkins# /opt/software/java/jdk-11/bin/java -version
bash: /opt/software/java/jdk-11/bin/java: cannot execute: required file not found
6a8618f52c72:/home/jenkins# ls -al /opt/software/java/jdk-11/bin/
total 512
drwxrwxrwx 2 root root 4096 Apr 2 13:05 .
drwxrwxrwx 8 root root 96 Apr 2 13:05 ..
-rwxr-xr-x 1 668 668 12952 Aug 23 2018 jaotc
-rwxr-xr-x 1 668 668 8736 Aug 23 2018 jar
-rwxr-xr-x 1 668 668 8736 Aug 23 2018 jarsigner
-rwxr-xr-x 1 668 668 8672 Aug 23 2018 java
-rwxr-xr-x 1 668 668 8784 Aug 23 2018 javac
1条答案
按热度按时间ws51t4hk1#
谢谢
实际上,容器Jenkins/ss-agent上有另一个jdk,而这个jdk是用我自己的mount jdk。