WSL内のdocker内でjenkinsを起動しようとすると、権限の問題が発生します。
⇒ sudo docker run --name jenkins_3 -p 8081:8080 -p 50001:50000 -e JAVA_OPTS="-Djava.io.tmpdir=/mnt/c/exemple_dir" jenkins
/usr/local/bin/jenkins.sh: line 23: cannot create temp file for here-document: Permission denied
Running from: /usr/share/jenkins/jenkins.war
webroot: EnvVars.masterEnvVars.get("JENKINS_HOME")
Exception in thread "main" java.io.IOException: Jenkins has failed to create a temporary file in /tmp
at Main.extractFromJar(Main.java:397)
at Main._main(Main.java:230)
at Main.main(Main.java:132)
Caused by: java.io.IOException: Permission denied
at java.io.UnixFileSystem.createFileExclusively(Native Method)
at java.io.File.createTempFile(File.java:2024)
at Main.extractFromJar(Main.java:394)
私の/ tmpフォルダにはすべての権限があります。
⇒ ls -ald /tmp
drwxrwxrwt 1 root root 512 Jun 13 13:45 /tmp
./bin 権限:
⇒ ls -ald /usr/local/bin
drwxrwxrwx 1 root root 512 Jun 4 16:07 bin