Get the App
SLTechnology News&Howtos  ›  Development  › 

What is the process for Docker to install Jenkins-2.249.3-1.1?

Shulou Source: shulou.com Published: 2022-06-03 03:17:03 09月21日 Update

This article mainly explains "what is the process of installing Jenkins-2.249.3-1.1in Docker". The content in the article is simple and clear and easy to learn and understand. Please follow the editor's train of thought to study and learn "what is the process of installing Jenkins-2.249.3-1.1in Docker".

Catalogue

First, install Docker

2. Pull the Jenkins image file

Create a mount directory and authorize it

Create and start the Jenkins container

5. Check whether jenkins is started successfully

6. View docker container logs

7. Visit Jenkins

8. Install Jenkins

First, install Docker#1. Write the Docker installation script [root@ip-10-0-12-21221212] # vim Ins_Docker.sh#! / usr/bin/bash# Author:jh# Time:2021-10-09 11 usr/bin/bash# Author:jh# Time:2021 54 Name:Ins_Docker.sh# Version: 1. Write the Discription: To source / etc/init.d/functionsrely_software= (yum-utils device-mapper-persistent-data lvm2) echo "- # 1. Detect the system kernel version-"kernel_version= `uname-a | awk'{print $3}'| cut-d. -f1` [$kernel_version-ge 3] & & action "The System Install Docker is." / usr/bin/true | | action "The System Can not Install Docker is..."; exit echo "- # 2. Install Docker dependency software-"for i in ${rely_software [*]} do rpm-Q $I & > / dev/null if [$?-eq 0] Then echo "$i is installed" else yum-y install $I & > / dev/null action "$i is installing" / usr/bin/true fi doneecho "- # 3. Add Docker image source-"yum-config-manager-- add-repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo[ $?-eq 0] & & action" Docker Image add is. "/ usr/bin/true | | echo" Docker Image add is... "/ usr/bin/false;exitecho"-# 4. Install Docker- "yum-y install docker-ce rpm-qa | grep docker-ce [$?-eq 0] & & action" Docker-ce is installed. "/ usr/bin/true | | action" Docker-ce is install... "/ usr/bin/false;exitecho"-# 5. Start Docker and set self-boot-"systemctl enable-- now docker [$?-eq 0] & & action" Docker Start is.; "/ usr/bin/true | | action" Docker start is... "/ usr/bin/falsedocker_version= `docker-v | awk-F','{print $1} '`echo"-# 6. Set up Docker Accelerator-"sudo mkdir-p / etc/dockersudo cat > / etc/docker/daemon.json

Tags: Process container directory script mirror learning success content file log root directory version page authentication information kernel accelerator Xiaoke cutie is Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Tech Info vpn Xiaomi Shulou Information MariaDB