Many tutorials on the web are about the Docker installation on Linux Jenkins, but I use a Mac, so refer to previous articles written by predecessors to record their own installation process.
1. New local mount file address, Mac I used
mkdir /Users/vincentwen/docker/jenkins
2. Run Jenkins to mount the local host file address
8080:8080 -p 50000:50000 --name jenkins --privileged=true -v /Users/vincentwen/docker/jenkins:/var/jenkins_home jenkins
Require the host password to be entered
To see if the container is running successfully
sudo docker ps
You can see that the container ID indicates that the container is running successfully. Start formally installing Jenkins
First visit to Jenkin
Access Address:
http://localhost:8080
Need to enter a randomly generated password for Jenkins
There are two ways to get this password
- 1: Directly into the host mounted local files, that is, my Mac folder/users/vincentwen/docker/jenkins, this address, find the file Initialadminpassword, use a text editor to open
cat /Users/vincentwen/docker/jenkins/secrets/initialAdminPassword
Copy the password, paste it into the registration Input password screen, click Next
3 Installing Plugins
You can use the recommended installation plug-in, or you can customize the installation plugin
I use the recommended plug-in installation here, choose to start the installation
4 Enter your account password and click Finish installation
Complete the installation
MAC Environment Docker Installation Jenkins