Docker Jenkins
1、Docker安装Jenkins
[root@iZuligp6e1dyzfZ /]# docker pull jenkins
[root@iZuligp6e1dyzfZ /]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
docker.io/zookeeper latest 7341c5373a13 6 days ago 252 MB
docker.io/mysql latest e3fcc9e1cc04 12 days ago 544 MB
docker.io/jenkins latest cd14cecfdb3a 2 years ago 696 MB
2、运行Jenkins容器
[root@iZuligp6e1dyzfZ /]# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS
NAMES
6c06b127e03a 7341c5373a13 "/docker-entrypoin..." 46 minutes ago Up 46 minutes 2181/tcp, 2888/tcp, 3888/tcp, 0.0.0.0:2180->2180/tcp, 8080/tcp zk01
[root@iZuligp6e1dyzfZ /]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
docker.io/zookeeper latest 7341c5373a13 6 days ago 252 MB
docker.io/mysql latest e3fcc9e1cc04 12 days ago 544 MB
docker.io/jenkins latest cd14cecfdb3a 2 years ago 696 MB
[root@iZuligp6e1dyzfZ /]# docker run -d --name jenkins01 -p 8081:8081 cd14cecfdb3a
ad0ed7c845f7e82f731bb21c46bfe331125f88af8e94cf21d0c9ba472a91632b
[root@iZuligp6e1dyzfZ /]# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
ad0ed7c845f7 cd14cecfdb3a "/bin/tini -- /usr..." 2 minutes ago Up 2 minutes 8080/tcp, 50000/tcp, 0.0.0.0:8081->8081/tcp jenkins01
6c06b127e03a 7341c5373a13 "/docker-entrypoin..." 48 minutes ago Up 48 minutes 2181/tcp, 2888/tcp, 3888/tcp, 0.0.0.0:2180->2180/tcp, 8080/tcp zk01