<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="../assets/xml/rss.xsl" media="all"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Aaron Ji's blog (Posts about jenkins)</title><link>https://blog.jiya.net/</link><description></description><atom:link href="https://blog.jiya.net/categories/jenkins.xml" rel="self" type="application/rss+xml"></atom:link><language>en</language><copyright>Contents © 2023 &lt;a href="mailto:me@jiya.net"&gt;Aaron Ji&lt;/a&gt; </copyright><lastBuildDate>Tue, 08 Aug 2023 15:12:47 GMT</lastBuildDate><generator>Nikola (getnikola.com)</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>Deploy Jenkins With docker-compose</title><link>https://blog.jiya.net/posts/2022/03/deploy-jenkins-with-docker-compose.html</link><dc:creator>Aaron Ji</dc:creator><description>&lt;p&gt;
The docker-compose yaml file as follows:
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;---
version: '3'

services:
  jenkins:
    image: jenkins/jenkins:lts-jdk11
    privileged: true
    user: root
    restart: always
    ports:
      - 50000:50000
      - 8088:8080 # local port is 8088, container port is 8080
    volumes:
      - /data/work/jenkins/jenkins_home:/var/jenkins_home
    container_name: jenkins
    networks:
      jenkins:
        ipv4_address: 172.16.128.2
    environment:
      - TZ=Asia/Shanghai

  centos6:
     image: centos6-i386:20220321
     container_name: centos6-i386
     restart: always
     expose:
      - "22"
     networks:
       jenkins:
          ipv4_address: 172.16.128.6
     command: /bin/bash -c '/usr/sbin/sshd -D &amp;amp;&amp;amp; /bin/bash'
     volumes:
       - /data/work/jenkins/centos6-i386/home/centos:/home/centos

  centos7:
    image: centos7:20220321
    container_name: centos7
    restart: always
    expose:
      - "22"
    networks:
      jenkins:
        ipv4_address: 172.16.128.7
    command: /bin/bash -c '/usr/sbin/sshd -D &amp;amp;&amp;amp; /bin/bash'
    volumes:
      - /data/work/jenkins/centos7/home/centos:/home/centos

networks:
  jenkins:
    driver: bridge
    ipam:
      driver: default
      config:
        - subnet: 172.16.128.0/24
          gateway: 172.16.128.1
&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;
Since the slave nodes, &lt;code&gt;centos6&lt;/code&gt; and &lt;code&gt;centos7&lt;/code&gt; container's image is migrated from another host, and some issues occurred during the migration, the solution logged at  &lt;a href="https://blog.jiya.net/posts/2021/04/docker-note.html#migrate-container-from-a-host-to-another-host"&gt;Docker Note&lt;/a&gt; .
&lt;/p&gt;</description><category>jenkins</category><guid>https://blog.jiya.net/posts/2022/03/deploy-jenkins-with-docker-compose.html</guid><pubDate>Mon, 28 Mar 2022 05:27:00 GMT</pubDate></item></channel></rss>