0

Windows 10 Home, WSL2, Jenkins 2.263, Docker

I am learning Jenkins and doing the tutorial by Starmer.

In an ubuntu terminal (Windows 10 Home WSL2) I ran the provided code:

useradd jenkins -m
docker run \
  -u jenkins \
  --rm \
  -d \
  -p 8080:8080 \
  -p 50000:50000 \
  -v /var/run/docker.sock:/var/run/docker.sock \
  -v /home/jenkins:/var/jenkins_home \
  jenkins/jenkins:lts
cat /home/jenkins/secrets/initialAdminPassword

But when I open localhost:8080 in my browser, instead of seeing the Jenkins dashboard, I see

screenshot of localhost

But when I stop the container from Docker and launch Jenkins from java -jar jenkins.war then I can see the dashboard at localhost:8080

I also tried deleting the jenkins folder, and the jenkins/jenkins:lts image from Docker Desktop and pulled again and get

cat: /home/jenkins/secrets/initialAdminPassword: No such file or directory
likejudo
  • 3,396
  • 6
  • 52
  • 107

1 Answers1

0

It started working. I don't know what fixed it but these are what I tried:

  1. In Docker Desktop, reset all data to factory defaults
  2. Created ubuntu root password and did a su -
  3. Turned off experimental Docker feature "cloud enabled".
  4. I found the secret admin password in the Console in Docker desktop, not in the ubuntu shell.

Now I was able to go to localhost:8080 and enter the admin password.

likejudo
  • 3,396
  • 6
  • 52
  • 107