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