How to start Docker Jenkins container in windows 10.

Precondition- Docker should be installed .
To pull Jenkins image
docker pull jenkins

Then open a command line or GITBASH window by right click and run as administrator.

docker run -u 0 — name MyJenkins -p 8080:8080 -p 50000:50000 -v /Users/username/Desktop/Jenkins_Home:/var/jenkins_home jenkins

Jenkins_Home will be created and it will be similar and corresponding to jenkins_home folder.
The last jenkins is the image name which we downloaded form docker.
To solve an error I used the -u parameter. Keep in mind this will run as a root user (uid=0)

If you get an error it is more likely due to below issue in docker itself.

A bug is there .
https://github.com/docker/for-win/issues/3171

docker: Error response from daemon: Ports are not available: listen tcp 0.0.0.0:50000: bind: An attempt was made to access a socket in a way forbidden by its access permissions.

solution is type below command in cmd and reboot
reg add HKLM\SYSTEM\CurrentControlSet\Services\hns\State /v EnableExcludedPortRange /d 0 /f

Then re run the command to create Jenkins.

This may also be found at: /var/jenkins_home/secrets/initialAdminPassword*************************************************************

Password can be found in the above section in the log.

Jenkin URL to access the site is given below and create an account using the password.
http://localhost:8080/loginError

--

--

--

https://www.linkedin.com/in/sameera-de-silva-11247922/

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Community Conversations: Behind the Scenes with Seb Mondet, Senior Software Engineer at TQ Tezos

3 Research-Backed Reasons Why a Developer Can’t Be Blamed for Not Reaching the Deadline

How to start writing your first Webapp 2

Differences between JVM, JRE and JDK

CS371p Spring 2020: Amanda Brown (Final Entry)

Week 4 Progress at NCE

Big Data Architectures — Lamdba & Kappa

https://youtu.be/2zDq7S96JrU

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Sameera De Silva

Sameera De Silva

https://www.linkedin.com/in/sameera-de-silva-11247922/

More from Medium

Bypass Azure AD authentication using Selenium C# on release pipeline

Configure a local Jenkins instance

CICD with Jenkins Pipelines Running in Docker

GIT commands