Docker deployment and installation steps for Jenkins

Docker deployment and installation steps for Jenkins

First, we need a server with Docker installed. (I have already installed this on my server)

The first step is to pull down the image

docker pull jenkins/jenkins:lts 

The second step is to create a mapping directory

# Create a mapping directory in the appropriate location mkdir -p jenkins_home
# Check directory permissions ls -nd jenkins_home
# Change the owner to administrator sudo chown -R 1000:1000 jenkins_home 

Step 3: Start Jenkins

# View docker images 

# Start Jenkins
docker run -d -p 12580:8080 --name=jenkins -v /my_data/jenkins_home/:/var/jenkins_home jenkins/jenkins:lts

Step 4: Open the Jenkins webpage

Then we need to enter the container and view the password

# View the container list sudo docker ps 

Then enter the container according to the container ID

sudo docker exec -it 8c6be63a8fd5 /bin/sh

Then get the password

cat /var/jenkins_home/secrets/initialAdminPassword

Then fill in this password into the above web page.

Then an error may be reported: The cloudbees-folder plugin is missing

The solution is to go to Index of /packages/jenkins/plugins/cloudbees-folder/latest

After downloading, put it in war/WEB-INF/detached-plugins under the jenkins_home folder, and then restart the container.

Next, install the recommended plugins

Then create an administrator user and complete the Jenkins installation!

This is the end of this article about the implementation steps of Docker deployment and installation of Jenkins. For more relevant content about Docker deployment and installation of Jenkins, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future!

You may also be interested in:
  • Install Mongo4.2 and client tools to connect to Mongo under Docker
  • Detailed steps to install RabbitMQ in docker
  • Docker installation of RocketMQ and solutions to problems encountered during installation
  • Install zeppeline in docker

<<:  What are HTML inline elements and block-level elements and their differences

>>:  Book page turning effects made with CSS3

Recommend

How to connect to MySQL remotely through Navicat

Using Navicat directly to connect via IP will rep...

Understanding and application scenarios of enumeration types in TypeScript

Table of contents 1. What is 2. Use Numeric Enume...

How to use nginx as a proxy cache

The purpose of using cache is to reduce the press...

Should the Like function use MySQL or Redis?

Table of contents 1. Common mistakes made by begi...

Basic knowledge: What does http mean before a website address?

What is HTTP? When we want to browse a website, w...

Detailed process of getting started with docker compose helloworld

Prerequisites Compose is a tool for orchestrating...

MySQL trigger trigger add, delete, modify and query operation example

This article uses examples to describe the add, d...

Summary of the most commonly used knowledge points about ES6 new features

Table of contents 1. Keywords 2. Deconstruction 3...

WeChat applet implements simple calculator function

WeChat applet: Simple calculator, for your refere...

mysql command line script execution example

This article uses an example to illustrate the ex...

How to add ansible service in alpine image

Use apk add ansible to add the ansible service to...