turboaaa/docker-nxfilter

setcap on java failure - file not found

Closed this issue · 0 comments

Need to modify the run command to check for the file instead of assuming it exists.

Step 7/9 : RUN setcap CAP_NET_BIND_SERVICE=+eip /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.201.b09-2.el7_6.x86_64/jre/bin/java
 ---> Running in 71dc3a973dab

Failed to set capabilities on file `/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.201.b09-2.el7_6.x86_64/jre/bin/java' (No such file or directory)
usage: setcap [-q] [-v] (-r|-|<caps>) <filename> [ ... (-r|-|<capsN>) <filenameN> ]

 Note <filename> must be a regular (non-symlink) file.
The command '/bin/sh -c setcap CAP_NET_BIND_SERVICE=+eip /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.201.b09-2.el7_6.x86_64/jre/bin/java' returned a non-zero code: 1