Installing JENKINS through Docker File For Windows Container

Installing JENKINS through Docker File For Windows Container

 Installing JENKINS through Docker File For Windows Container

In this blog, we will show you installing JENKINS through docker file for Windows container onWindowss 2016.

 

REQUIREMENTS

  • Windows Container Host
  • JENKINS setup file

 

DOWNLOAD JENKINS

installing JENKINS through docker file for Windows container

 

  • Scroll down and click on the Windows link

installing JENKINS through docker file for Windows container

 

  • It prompts us to download the zip file.

installing JENKINS through docker file for Windows container

 

  • Once the download is complete and extracts the MSI from the ZIP file.

installing JENKINS through docker file for Windows container

 

PREPARING BUILD ENVIRONMENT

  • Create a folder named Jenkins in C:\ drive using below command

New-Item -Type Directory -Name jenkins -Path c:\

installing JENKINS through docker file for Windows container

 

  • Create one more folder name source inside C:\jenkins folder.

New-Item -Type Directory -Name setup -path C:\jenkins\

installing JENKINS through docker file for Windows container

 

  • Create a filename dockerfile inside c:\jenkins folder.

New-Item -Type File -Name dockerfile -Path C:\jenkins\

Installing JENKINS through docker file for Windows container

 

  • Copy the downloaded jenkins setup file to c:\jenkins\setup folder.

Installing JENKINS through docker file for Windows container

 

  • Open the dockerfile in the notepad and add the below code and save it.

#THIS DOCKER FILE IS DEVELOPED BY ASSISTANZ NETWORKS

#SPECIFY THE CONTAINER IMAGE
FROM microsoft/windowsservercore

#COPY THE JENKINS INSTALLATION FILES INTO THE CONTAINER
ADD ./setup c:/jenkins

#INSTALLING IIS
RUN Powershell.exe -Command Install-WindowsFeature Web-Server

#INSTALLING JENKINS
RUN ["msiexec.exe", "/i", "C:\\jenkins\\jenkins.msi", "/qn"]

#REMOVING SETUP FILES FROM CONTAINER
RUN Powershell.exe -Command remove-item c:/jenkins –Recurse

 

Installing JENKINS through docker file for Windows container

 

BUILDING THE IMAGE

  • Go-to PowerShell and execute the below command to build the jenkins image.

docker build -t jenkins c:\jenkins

Installing JENKINS through docker file for Windows container

 

  • It will take several minutes to complete the build.

Installing JENKINS through docker file for Windows container

 

CONFIGURE JENKINS

  • Launch a new container using the Jenkins image which we built earlier.

docker run -it jenkins powershell

Installing JENKINS through docker file for Windows container

 

  • Once the container is created, type ipconfig to find the IP address.

Installing JENKINS through docker file for Windows container

 

  • Browse the IP along with port 8080 from your container host. It prompts for the initial administrator password to configure Jenkins.

Installing JENKINS through docker file for Windows container

 

  • Type the below command to view the administrator password from the initialadminpassword file.

type ‘C:\Program Files (x86)\Jenkins\secrets\initialAdminPassword’

Installing JENKINS through docker file for Windows container

 

  • Copy & paste the password and click continue.

Installing JENKINS through docker file for Windows container

 

  • In the next screen, select the plugins to be installed for your environment. For this demo, we have installed all the suggested plugins for Jenkins.

Installing JENKINS through docker file for Windows container

 

  • It will take few minutes to complete the installation.

Installing JENKINS through docker file for Windows container

 

  • In next screen, it prompts for to create a new admin user. Provide the details and click save and finish.

Installing JENKINS through docker file for Windows container

 

  • The final screen shows that Jenkins is ready. Click on Start using Jenkins button.

Installing JENKINS through docker file for Windows container

  • Now jenkins is available for our environment.

Installing JENKINS through docker file for Windows container

 

  • You can download the pre-built image from the Docker Hub URL

https://hub.docker.com/r/assistanz247/jenkins-windows/

  • Also, you can download the dockerfile from GitHub URL.

https://github.com/assistanz247/JENKINS

 

VIDEO

Thanks for reading this blog. We hope it was useful for you to learn to how to install Jenkins in windows container.

Share on facebook
Facebook
Share on twitter
Twitter
Share on pinterest
Pinterest
Share on linkedin
LinkedIn
More Interested Related Posts
zfs pool usage

ZFS Pool and Dataset Usage

ZFS Pool and Dataset Usage   I am back with another blog to provide the useful script to the Freebsd users to determine the zpool

Assistanz Networks

Installing Zabbix Agent in FreeBSD 12.0

Zabbix Agent Installation and Configuration Guide on FreeBSD 12.0   Zabbix is an open-source monitoring software tool for diverse IT components, including networks, servers, virtual

DirectAdmin Server Management Plans

Premium Support

24/7 End User Support from your Helpdesk
$ 99 Monthly / Server
  • Unlimited Support Plan
  • 24/7 Emergency Phone
  • Chat Support for Admin
  • Separate Account Manager
  • NDA & SLA
  • SLA Review Meetings
  • FREE Consultancy Services
  • Simple SignUp Process
  • Instant Account Activation
  •  

Platinum Support

24/7 Proactive Support
$ 49 Monthly / Server
  • Unlimited Support Plan
  • 24/7 Emergency Phone
  • Chat Support for Admin
  • Separate Account Manager
  • Advance Proactive Monitoring
  • Guaranteed SLA
  • SLA Review Meetings
  • 3rd Party Application Support
  • FREE Consultancy Services
  • Server Migration Support
  • Weekly Status Report
  • No End User Support
Popular

Unlimited Support

24/7 Support

$ 30 Monthly / Server
  • Unlimited Support Plan
  • 24/7 Support
  • Basic Monitoring
  • 30 Minutes Response Time
  • 4 Hours Resolution time for the Possible Issues
  • Security and Performance Optimization
  • React to Customers queries
  • Simple SignUp Process
  • Instant Account Activation
  • No Third party application support
  • No Migration and End User Support

Cpanel Server Management Plans

Premium Support

24/7 End User Support from your Helpdesk

$ 99 Monthly / Server
  • 24/7 End User White Label Support
  • Unlimited Number of Tickets
  • Chat Support for Admin
  • Separate Account Manager
  • Guaranteed SLA
  • Weekly Status Reports
  • FREE Consultancy Services
  • Simple SignUp Process
  • Instant Account Activation

Platinum Support

24/7 Proactive Server Management
$ 49 Monthly / Server
  • Unlimited Support Plan
  • 24/7 Emergency Phone
  • Chat Support for Admin
  • Separate Account Manager
  • Advance Proactive Monitoring
  • Guaranteed SLA
  • SLA Review Meetings
  • 3rd Party Application Support
  • FREE Consultancy Services
  • Server Migration Support
  • Weekly Status Report
  • No End User Support
Popular

Unlimited Support

24/7 Server Management

$ 29 Monthly / Server
  • Unlimited Admin Tasks
  • 24/7 Support
  • Basic Monitoring
  • 30 Minutes Response time
  • 4 hours Response time for possible issues
  • Security and Performance Optimization
  • React to Customers queries
  • No Third party application support
  • No Migration and End User Support

Cpanel Server Management Plans

Premium Support

24/7 End User Support from your Helpdesk

$ 99 Monthly / Server
  • 24/7 End User White Label Support
  • Unlimited Number of Tickets
  • Chat Support for Admin
  • Separate Account Manager
  • Guaranteed SLA
  • Weekly Status Reports
  • FREE Consultancy Services
  • Simple SignUp Process
  • Instant Account Activation

Platinum Support

24/7 Proactive Server Management
$ 49 Monthly / Server
  • Unlimited Support Plan
  • 24/7 Emergency Phone
  • Chat Support for Admin
  • Separate Account Manager
  • Advance Proactive Monitoring
  • Guaranteed SLA
  • SLA Review Meetings
  • 3rd Party Application Support
  • FREE Consultancy Services
  • Server Migration Support
  • Weekly Status Report
  • No End User Support
Popular

Unlimited Support

24/7 Server Management

$ 29 Monthly / Server
  • Unlimited Admin Tasks
  • 24/7 Support
  • Basic Monitoring
  • 30 Minutes Response time
  • 4 hours Response time for possible issues
  • Security and Performance Optimization
  • React to Customers queries
  • No Third party application support
  • No Migration and End User Support