[root@jenkins ~]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
39746ddd0d61 registry.cn-hangzhou.aliyuncs.com/goodrain/rainbond:v5.10.1-dind-allinone "/usr/bin/supervisord" 2 days ago Up 2 days 0.0.0.0:80->80/tcp, :::80->80/tcp, 0.0.0.0:443->443/tcp, :::443->443/tcp, 0.0.0.0:6060->6060/tcp, :::6060->6060/tcp, 0.0.0.0:7070->7070/tcp, :::7070->7070/tcp, 0.0.0.0:8443->8443/tcp, :::8443->8443/tcp, 0.0.0.0:10000-10050->10000-10050/tcp, :::10000-10050->10000-10050/tcp rainbond-allinone
23900021715c jenkins:2.340 "/sbin/tini -- /usr/…" 5 weeks ago Up 12 days 0.0.0.0:8080->8080/tcp, :::8080->8080/tcp, 0.0.0.0:50000->50000/tcp, :::50000->50000/tcp jenkins
54b64c41a309 sonatype/nexus3:latest "sh -c ${SONATYPE_DI…" 7 months ago Up 12 days 0.0.0.0:8081->8081/tcp, :::8081->8081/tcp nexus3
[root@jenkins jenkins]# cat docker-compose.yml
version: '3.1'
services:
jenkins:
#image: jenkins/jenkins:lts
image: jenkins:2.340
volumes:
- /data/jenkins/data:/var/jenkins_home
- /run/docker.sock:/var/run/docker.sock
- /usr/bin/docker:/usr/bin/docker
- /usr/bin/kubectl:/usr/bin/kubectl
- /usr/local/maven3:/usr/local/maven3
- /usr/local/sonar-scanner:/usr/local/sonar-scanner
- /usr/local/node:/usr/local/node
- /root/.kube/admin.conf:/root/.kube/admin.conf
- /usr/local/java/jdk1.8.0_144:/opt/java/openjdk
- /root/.m2:/root/.m2
ports:
- "8080:8080"
- "50000:50000"
restart: always
container_name: jenkins
user: root
environment:
JAVA_OPTS: '-Djava.util.logging.config.file=/var/jenkins_home/log.properties -Dhudson.model.DirectoryBrowserSupport.CSP='
TZ : 'Asia/Shanghai'
[root@jenkins jenkins]# docker images |grep jenkins
jenkinsci/blueocean latest 04540a0bb985 4 months ago 579MB
jenkins 2.340 37044251f65e 6 months ago 535MB
标签:106,tcp,local,usr,0.0,jenkins,root From: https://www.cnblogs.com/vzhangxk/p/17059935.html