Example of building a Jenkins service with Docker

Example of building a Jenkins service with Docker

Pull the image

root@EricZhou-MateBookProX: docker pull jenkins/jenkins:lts
lts: Pulling from jenkins/jenkins
3192219afd04: Pull complete
17c160265e75: Pull complete
cc4fe40d0e61: Pull complete
9d647f502a07: Extracting [====================================> ] 35.65MB/50.07MB
d108b8c498aa: Download complete
1bfe918b8aa5: Download complete
dafa1a7c0751: Downloading [==================> ] 36.8MB/104.2MB
9221a8ef4852: Downloading [===> ] 3.116MB/44.27MB
a79e75dd432b: Download complete
efbc20726efc: Downloading

Create a data volume directory

makdir /home/jenkins

docker run container

docker run -d --name jenkins -p 7000:80 -v /home/jenkins:/home/jenkins jenkins/jenkins:lts

Check the jenkins container and the status value is UP

root@EricZhou-MateBookProX: docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
29c2a14856be jenkins/jenkins:lts "/sbin/tini -- /usr/…" 22 seconds ago Up 21 seconds 8080/tcp, 50000/tcp, 0.0.0.0:7000->80/tcp jenkins

Enter localhost:7000 in the browser and access the following page

Enter the container, get the password, and enter it

# Enter the container root@EricZhou-MateBookProX: docker exec -it jenkins bash
# Get the password jenkins@2fdf047094f6:/$ cat /var/jenkins_home/secrets/initialAdminPassword
1c45086eac3043feade3e816a306cf5b 

Install the recommended plugins, wait for the installation process, and the service is set up

The above is the details of the example of building a Jenkins service with Docker. For more information about building a Jenkins service with Docker, please pay attention to other related articles on 123WORDPRESS.COM!

You may also be interested in:
  • Docker builds Jenkins and automates the steps of packaging and deploying projects
  • Using Docker+jenkins+python3 environment to build a super detailed tutorial
  • Docker+gitlab+jenkins builds automated deployment from scratch
  • Docker builds jenkins+maven code building and deployment platform
  • When setting up Jenkins in Docker environment, the console log shows garbled Chinese characters when building tasks
  • Implementation of Jenkins automation tool using docker

<<:  How to write high-quality JavaScript code

>>:  MySQL 5.7.31 64-bit free installation version tutorial diagram

Recommend

Detailed explanation of MLSQL compile-time permission control example

Preface The simple understanding of MySQL permiss...

Detailed steps to install mysql 8.0.18-winx64 on win10

1. First go to the official website to download t...

How to resize partitions in CentOS7

Yesterday, I helped someone install a system and ...

Tutorial on installing Apache 2.4.41 on Windows 10

1. Apache 2.4.41 installation and configuration T...

MySql knowledge points: transaction, index, lock principle and usage analysis

This article uses examples to explain the princip...

Share 20 JavaScript one-line codes

Table of contents 1. Get the value of browser coo...

Analysis of the Nesting Rules of XHTML Tags

In the XHTML language, we all know that the ul ta...

Analysis of Linux configuration to achieve key-free login process

1.ssh command In Linux, you can log in to another...

Beginners learn some HTML tags (3)

Beginners who are exposed to HTML learn some HTML...

Linux uses shell scripts to regularly delete historical log files

1. Tools directory file structure [root@www tools...

Detailed explanation of TS object spread operator and rest operator

Table of contents Overview Object rest attribute ...