$ docker pull jenkins/jenkins
Do not get this image, it's deprecated and won't work properly -- $ docker pull jenkins
Run the container
8080, 8090 are used on my system, so I'm mapping to 8100 instead:
$ docker run --name jenkins -p 8100:8080 -p 50000:50000 -d jenkins/jenkins
Do below as soon as you run the container as above. Then you'll see admin password in the log,
$ docker logs -f jenkins
Open browser, http://localhost:8100
It'll ask for password stored in the conainer fils system. Enter the password from the above log. If you missed it, then log onto the container and retrieve it,
$ docker exec -it jenkins bash
In the container,
$ more /var/jenkins_home/secrets/initialAdminPassword
Copy & paste the password on the web page. Then install plugins and set up a user.
Docker makes everything so simple and sweet!