Mac environment docker install jenkins

Many tutorials on the Internet are about installing Jenkins on Docker on Linux, but I am using a Mac, so I will refer to the articles written by my predecessors and record my own installation process.

1. Create a new local mount file address, the mac I use

mkdir /Users/vincentwen/docker/jenkins



2. Run Jenkins and mount the local host file address

sudo docker run -itd -p 8080:8080 -p 50000:50000 --name jenkins --privileged=true -v /Users/vincentwen/docker/jenkins:/var/jenkins_home jenkins 

Ask for host password

 

Check if the container is running successfully

sudo docker ps

 

You can see that the container id indicates that the container is running successfully. Start the official installation of Jenkins

First visit to Jenkin

address:

http://localhost:8080

Requires a password randomly generated by Jenkins


 
 
 

There are two ways to get this password

  • 1: Go directly to the local file mounted on the host, that is, my Mac folder /Users/vincentwen/docker/jenkins, at this address, find the file initialAdminPassword, and open it with a text editor

 

 

  • 2 Use the command to view

cat /Users/vincentwen/docker/jenkins/secrets/initialAdminPassword



Copy the password, paste it into the registration input password interface, and click Next


3 Install the plugin

You can use the recommended installation plug-ins, or you can customize the installation plug-ins

 

I use the recommended plug-in installation here, select it and start the installation

 

4 Enter the account password and click to complete the installation

 

finish installation

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325109667&siteId=291194637