docker under department jenkins

Jenkins

Mirror Pull

#53上的docker jenkins
#必须要给jenkins用户组1000权限
#jenkins:x:1000:1000::/home/jenkins:/bin/bash
sudo docker run -itd -p 8080:8080 -p 50000:50000 --name jenkins --privileged=true  --restart=always -m 3000M -v /data/jenkins_home/:/var/jenkins_home -v /usr/share/zoneinfo/Asia/Shanghai:/etc/localtime -v /etc/timezone:/etc/timezone jenkins/jenkins:lts
docker pull jenkins/jenkins

Current Version: 2.136

Installation instructions see: https://hub.docker.com/_/jenkins/

Create a working directory, pay attention to rights

mkdir -p /docker/jenkins/jenkins_home
chmod 777 /docker/jenkins/jenkins_home
docker run -p :8080 -p :50000 -d --name jenkins \
  -v /docker/jenkins/jenkins_home:/var/jenkins_home \
  -v /root/.m2:/var/jenkins_home/.m2 \
  -v /usr/share/zoneinfo/Asia/Shanghai:/etc/localtime \
  -e VIRTUAL_HOST=jenkins.wilmarops.cn \
  -e VIRTUAL_PORT=8080 \
  -e JAVA_OPTS=-Duser.timezone=Asia/Shanghai \
  -e JAVA_OPTS=-Dhudson.footerURL=http://www.wilmar-international.com/ \
  jenkins/jenkins

Look back admin password docker logs -f jenkins

*************************************************************
*************************************************************
*************************************************************

Jenkins initial setup is required. An admin user has been created and a password generated.
Please use the following password to proceed to installation:

2a9c66d5a8f147a4a994ade56857d374

This may also be found at: /var/jenkins_home/secrets/initialAdminPassword

*************************************************************
*************************************************************
*************************************************************

Access: http://jenkins.wilmarops.cn installed plug-ins, the administrator: admin / admin123

LDAP configuration

Note: LDAP with wrong on the board do not go!
/Var/jenkins_home/config.xml recommend doing a backup
way to unlock after the entrance: Modify /var/jenkins_home/config.xml true Changed to false, you do not need to sign (root user problems it does not matter)

Server: ldap://172.16.253.35:3268
root DN: DC=wilmar,DC=cn
User search filter: sAMAccountName={0}
Manager DN: CN=wilmar_ cas,CN=Users,DC=wilmar,DC=cn
Manager Password: sh.1234
Display Name LDAP attribute: displayname
Email Address LDAP attribute: mail

Be sure to set the Anonymous Users in the "Safety Matrix" note inside before saving to Administer, AD modify a user is an administrator and then change it back

Download the JDK, Maven

Automatically constructing, hook, timer

Language problems, time zone issues remain unresolved

"Manage Jenkins >> Script Console" and type

System.setProperty('org.apache.commons.jelly.tags.fmt.timeZone', 'America/Los_Angeles')

System time zone setting, or UTC, you may want to set changed: user.timezone user.language

Guess you like

Origin www.cnblogs.com/pcct/p/12127839.html