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

Blog    

Recommend

Detailed steps to install nginx on Apple M1 chip and deploy vue project

brew install nginx Apple Mac uses brew to install...

Solution to ES memory overflow when starting docker

Add the jvm.options file to the elasticsearch con...

MySQL database case sensitivity issue

In MySQL, databases correspond to directories wit...

Detailed steps for manually configuring the IP address in Linux

Table of contents 1. Enter the network card confi...

Docker Getting Started Installation Tutorial (Beginner Edition)

Doccer Introduction: Docker is a container-relate...

JavaScript to achieve stair rolling special effects (jQuery implementation)

I believe everyone has used JD. There is a very c...

Comparison of the use of form element attributes readonly and disabled

1) Scope of application: readonly:input[type="...

Detailed explanation of custom instructions for Vue.js source code analysis

Preface In addition to the default built-in direc...

HTML implements read-only text box and cannot modify the content

Without further ado, I will post the code for you...

Pure HTML and CSS to achieve JD carousel effect

The JD carousel was implemented using pure HTML a...

In-depth understanding of Vue's data responsiveness

Table of contents 1. ES syntax getter and setter ...

Detailed explanation of common Docker Compose commands

1. The use of Docker compose is very similar to t...

Detailed explanation of tinyMCE usage and experience

Detailed explanation of tinyMCE usage initializat...

The most complete 50 Mysql database query exercises

This database query statement is one of 50 databa...

Implementation of CSS3 3D cool cube transformation animation

I love coding, it makes me happy! Hello everyone,...