{"id":10472,"date":"2025-04-18T18:02:24","date_gmt":"2025-04-18T10:02:24","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/10472.html"},"modified":"2025-04-18T18:02:24","modified_gmt":"2025-04-18T10:02:24","slug":"24%e5%b9%b4%e6%9c%80%e6%96%b0-docker%e5%ae%89%e8%a3%85jenkins%e5%b9%b6%e5%8f%91%e5%b8%83%e6%9c%8d%e5%8a%a1%e5%99%a8%ef%bc%8c%e9%85%8d%e7%bd%ae%e7%8e%af%e5%a2%83%ef%bc%8c%e6%9c%80%e5%85%a8%ef%bc%8c","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/10472.html","title":{"rendered":"24\u5e74\u6700\u65b0 Docker\u5b89\u88c5jenkins\u5e76\u53d1\u5e03\u670d\u52a1\u5668\uff0c\u914d\u7f6e\u73af\u5883\uff0c\u6700\u5168\uff0c\u5df2\u6210\u529f\u9a8c\u8bc1\u3002"},"content":{"rendered":"<p>Docker\u5b89\u88c5jenkins&#xff0c;\u914d\u7f6e\u73af\u5883&#xff0c;\u6700\u5168&#xff0c;\u5df2\u6210\u529f\u9a8c\u8bc1\u3002<\/p>\n<h3>1\u3001\u5982\u4e0a\u5b89\u88c5jdk\u548cmaven&#xff0c;\u5e76\u914d\u7f6eetc\/profile<\/h3>\n<h3>2\u3001\u914d\u7f6ejenkins<\/h3>\n<p>docker pull jenkins\/jenkins:2.346.1-lts<br \/>\n#docker run -d -p 8080:8080 -p 50000:50000  &#8211;name jenkin jenkins\/jenkins:2.346.1-lts<br \/>\ndocker run -d   &#8211;name jenkin jenkins\/jenkins:2.346.1-lts<br \/>\nmkdir -p \/usr\/docker\/jenkins\/jenkins_home<br \/>\ndocker cp jenkin:\/var\/jenkins_home \/usr\/docker\/jenkins\/jenkins_home<\/p>\n<p>## 1000:1000: \u8868\u793a\u65b0\u7684\u6240\u6709\u8005\u548c\u6240\u5c5e\u7ec4\u3002\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d&#xff0c;1000 \u662f\u7528\u6237\u7684\u6807\u8bc6\u53f7&#xff08;UID&#xff09;&#xff0c;1000 \u662f\u7ec4\u7684\u6807\u8bc6\u53f7&#xff08;GID&#xff09;\u3002\u901a\u5e38&#xff0c;\u8fd9\u4e9b\u6807\u8bc6\u53f7\u5bf9\u5e94\u4e8e\u7cfb\u7edf\u4e2d\u7684\u7528\u6237\u548c\u7ec4\u3002 \u8bf7\u6ce8\u610f&#xff0c;1000 \u53ea\u662f\u4e00\u4e2a\u793a\u4f8b\u6807\u8bc6\u53f7\u3002<br \/>\n\u800c\u5bb9\u5668\u4e2djenkins\u7528\u6237\u7684 uid \u4e3a 1000\u3002<br \/>\nchown -R 1000:1000 \/usr\/docker\/jenkins<br \/>\nchown -R 777 \/usr\/docker\/jenkins<\/p>\n<p>chown \u7528\u4e8e\u66f4\u6539\u6587\u4ef6\u6216\u76ee\u5f55\u7684\u6240\u6709\u8005\u548c\u6240\u5c5e\u7ec4\u3002<br \/>\nchmod \u7528\u4e8e\u66f4\u6539\u6587\u4ef6\u6216\u76ee\u5f55\u7684\u6743\u9650\u3002<\/p>\n<p>docker rm -f jenkin<\/p>\n<p>#\u4fee\u6539\u955c\u50cf\u6e90<br \/>\ncd \/usr\/docker\/jenkins\/jenkins_home<\/p>\n<p>vim hudson.model.UpdateCenter.xml<\/p>\n<p>#\u5c06url\u5185\u5bb9\u4fee\u6539\u4e3a\u6e05\u534e\u5927\u5b66\u5b98\u65b9\u955c\u50cf<br \/>\nhttps:\/\/mirrors.tuna.tsinghua.edu.cn\/jenkins\/updates\/update-center.json<\/p>\n<p>\u793a\u4f8b&#xff1a;<br \/>\n&lt;url&gt;https:\/\/updates.jenkins.io\/update-center.json&lt;\/url&gt;<br \/>\n\u66ff\u6362\u6210&#xff1a;<br \/>\n&lt;url&gt;https:\/\/mirrors.tuna.tsinghua.edu.cn\/jenkins\/updates\/update-center.json&lt;\/url&gt;<\/p>\n<p>3\u3001\u6587\u4ef6\u5939\u6743\u9650<\/p>\n<p>\u4fee\u6539\u6587\u4ef6\u5939\u6743\u9650<br \/>\n\u9700\u8981\u4fee\u6539\u4e0b\u76ee\u5f55\u6743\u9650&#xff0c;\u56e0\u4e3a\u5f53\u6620\u5c04\u672c\u5730\u6570\u636e\u5377\u65f6&#xff0c;\/data\/jenkins_home\/\u76ee\u5f55\u7684\u62e5\u6709\u8005\u4e3aroot\u7528\u6237&#xff0c;<\/p>\n<p>\u800c\u5bb9\u5668\u4e2djenkins\u7528\u6237\u7684 uid \u4e3a 1000\u3002<\/p>\n<p>\u6211\u4eec\u521b\u5efa\u4e00\u4e2ajenkins\u76ee\u5f55<\/p>\n<p>chown -R 1000:1000 \/usr\/docker\/jenkins<\/p>\n<p>docker rm -f jenkin<\/p>\n<p>chmod -R 777 \/usr\/docker\/jenkins<\/p>\n<h3>3\u3001\u542f\u52a8\u5bb9\u5668<\/h3>\n<p>docker run -u root -d -p 9095:8080 -p 50000:50000 \\\\<br \/>\n-v \/usr\/docker\/jenkins\/jenkins_home:\/var\/jenkins_home  \\\\<br \/>\n-v $(which docker):\/bin\/docker \\\\<br \/>\n-v \/var\/run\/docker.sock:\/var\/run\/docker.sock \\\\<br \/>\n-v \/usr\/local\/java\/jdk1.8.0_401:\/usr\/local\/java \\\\<br \/>\n-v \/usr\/local\/maven\/apache-maven-3.9.6:\/usr\/local\/maven \\\\<br \/>\n-v \/etc\/localtime:\/etc\/localtime \\\\<br \/>\n&#8211;name jenkins jenkins\/jenkins<\/p>\n<h4>4\u3001\u83b7\u53d6\u767b\u5f55\u5bc6\u7801<\/h4>\n<ul>\n<li>\n<p>\u65e5\u5fd7\u67e5\u770b<\/p>\n<p> docker logs jenkins\n <\/li>\n<li>\n<p>\u83b7\u53d6\u5bc6\u7801\u6587\u4ef6&#xff08;2\u90091&#xff09;<\/p>\n<p> #\u5bb9\u5668\u6587\u4ef6<br \/>\ndocker exec jenkins cat \/var\/jenkins_home\/secrets\/initialAdminPassword<br \/>\n #\u6620\u5c04\u6587\u4ef6<br \/>\ncat \/usr\/docker\/jenkins\/jenkins_home\/secrets\/initialAdminPassword\n <\/li>\n<\/ul>\n<h3>5\u3001\u8bbf\u95eejenkins<\/h3>\n<p>\u672c\u4eba\u4e91\u670d\u52a1\u5668\u5730\u5740&#xff1a;111.231.74.191<\/p>\n<p>http:\/\/111.231.74.191:9095\/<\/p>\n<p>\u9700\u8981\u5f00\u653e9095\u7684\u7aef\u53e3<\/p>\n<p>\u8f93\u5165\u5bc6\u7801&#xff1a;\u4e4b\u524d\u83b7\u53d6\u7684\u5bc6\u7801<\/p>\n<p>28abb74d816b46818d0212d935df9e5a<\/p>\n<p>\u521b\u5efa\u7528\u6237<\/p>\n<p>admin<\/p>\n<p>3301359a<\/p>\n<h3>6\u3001\u5b89\u88c5\u63d2\u4ef6<\/h3>\n<p>\u63a8\u8350\u65b0\u624b\u5b89\u88c5\u3002<\/p>\n<p>\u7136\u540e\u518d\u5b89\u88c5\u4e00\u4e9b\u56fa\u5b9a\u7684\u63d2\u4ef6<\/p>\n<p>Maven Integration &#xff1a; Maven \u96c6\u6210\u7ba1\u7406\u63d2\u4ef6\u3002<br \/>\nDocker &#xff1a; Docker\u96c6\u6210\u63d2\u4ef6\u3002<br \/>\nGitLab &#xff1a; GitLab\u96c6\u6210\u63d2\u4ef6\u3002<br \/>\nPublish Over SSH&#xff1a;\u8fdc\u7a0b\u6587\u4ef6\u53d1\u5e03\u63d2\u4ef6\u3002<br \/>\nSSH: \u8fdc\u7a0b\u811a\u672c\u6267\u884c\u63d2\u4ef6\u3002<br \/>\nGit server&#xff1a;\u53ef\u4ee5\u76f4\u63a5\u63d2\u4ef6\u5b89\u88c5git&#xff0c;\u907f\u514d\u672c\u5730\u6302\u8f7d\u7684\u5b9d\u8d1d<br \/>\nblue ocean:<br \/>\nDeploy to container:<br \/>\ndockerpip line:<br \/>\ngit param :<\/p>\n<h3>7\u3001\u4f7f\u7528\u82e5\u4f9d\u9879\u76ee\u4f5c\u4e3a\u524d\u540e\u7aef\u53d1\u5e03<\/h3>\n<li>\u4e0b\u8f7d\u73b0\u5728\u5f00\u59cb\u51c6\u5907\u524d\u540e\u7aef\u5206\u79bb\u7684\u9879\u76ee, \u4ee5RuoYi-Vue\u4e3a\u4f8b\u8fdb\u884c\u90e8\u7f72, \u4e0b\u8f7dzip\u5305<\/li>\n<li>\u89e3\u538b, \u7136\u540e\u5c06ruoyi-ui\u526a\u5207\u51fa\u6765\u653e\u5728\u5916\u9762, \u5f62\u6210\u524d\u540e\u7aef\u5206\u79bb\u7684\u4e24\u4e2a\u9879\u76ee<\/li>\n<li>\u5728RuoYi-Vue-master\u9879\u76ee\u4e2d\u7f16\u5199Dockerfile\u548cJenkinsfile\u4e24\u4e2a\u6587\u4ef6, Dockerfile\u662f\u5c06jar\u5305\u751f\u6210\u955c\u50cf, Jenkinsfile\u662f\u6267\u884c\u6d41\u6c34\u7ebf\u7684\u811a\u672c<\/li>\n<h4>1.\u540e\u7aef<\/h4>\n<h5>dockerfile<\/h5>\n<p># FROM java:8<br \/>\nFROM anapsix\/alpine-java:8_server-jre_unlimited<br \/>\n# \u5c06\u5f53\u524d\u76ee\u5f55\u4e0b\u7684jar\u5305\u590d\u5236\u5230docker\u5bb9\u5668\u7684\/\u76ee\u5f55\u4e0b<br \/>\nCOPY *.jar \/app.jar<br \/>\n# \u8fd0\u884c\u8fc7\u7a0b\u4e2d\u521b\u5efa\u4e00\u4e2axx.jar\u6587\u4ef6<br \/>\nRUN touch \/app.jar<\/p>\n<p>ENV TZ&#061;Asia\/Shanghai JAVA_OPTS&#061;&#034;-Xms128m -Xmx256m -Djava.security.egd&#061;file:\/dev\/.\/urandom&#034;<br \/>\nENV PARAMS&#061;&#034;&#8211;spring.profiles.active&#061;prod&#034;<\/p>\n<p># \u58f0\u660e\u670d\u52a1\u8fd0\u884c\u57288080\u7aef\u53e3<br \/>\nEXPOSE 8080<br \/>\n# \u6307\u5b9adocker\u5bb9\u5668\u542f\u52a8\u65f6\u8fd0\u884cjar\u5305<br \/>\nENTRYPOINT [ &#034;sh&#034;, &#034;-c&#034;, &#034;java $JAVA_OPTS -jar \/app.jar $PARAMS&#034; ]<\/p>\n<h5>jenkisfile<\/h5>\n<p>pipeline{<br \/>\n    agent any<br \/>\n    environment {<br \/>\n      IMAGE_NAME &#061; &#034;ruoyi-admin&#034;<br \/>\n      WS &#061; &#034;${WORKSPACE}&#034;<br \/>\n    }<\/p>\n<p>    \/\/\u5b9a\u4e49\u6d41\u6c34\u7ebf\u7684\u52a0\u5de5\u6d41\u7a0b<br \/>\n    stages {<br \/>\n        \/\/\u6d41\u6c34\u7ebf\u7684\u6240\u6709\u9636\u6bb5<br \/>\n        stage(&#039;1.\u73af\u5883\u68c0\u67e5&#039;){<br \/>\n            steps {<br \/>\n               sh &#039;pwd &amp;&amp; ls -alh&#039;<br \/>\n               sh &#039;printenv&#039;<br \/>\n               sh &#039;docker version&#039;<br \/>\n               sh &#039;java -version&#039;<br \/>\n               sh &#039;git &#8211;version&#039;<br \/>\n            }<br \/>\n        }<\/p>\n<p>        stage(&#039;2.\u7f16\u8bd1&#039;){<br \/>\n            agent {<br \/>\n                docker {<br \/>\n                    image &#039;maven:3-alpine&#039;<br \/>\n                    args &#039;-v maven-repository:\/root\/.m2&#039;<br \/>\n                 }<br \/>\n            }<br \/>\n            steps {<br \/>\n               sh &#039;pwd &amp;&amp; ls -alh&#039;<br \/>\n               sh &#039;mvn -v&#039;<br \/>\n               sh &#039;cd ${WS} &amp;&amp; mvn clean package -s &#034;\/usr\/local\/maven\/conf\/settings.xml&#034; -Dmaven.test.skip&#061;true&#039;<br \/>\n            }<br \/>\n        }<\/p>\n<p>        stage(&#039;3.\u6253\u5305&#039;){<br \/>\n            steps {<br \/>\n               sh &#039;pwd &amp;&amp; ls -alh&#039;<br \/>\n               sh &#039;echo ${WS}&#039;<br \/>\n               \/\/ sh &#039;mv ${WS}\/${IMAGE_NAME}\/target\/*.jar ${WS}\/${IMAGE_NAME}.jar &amp;&amp; pwd &amp;&amp; ls -alh &amp;&amp; docker build -t ${IMAGE_NAME} .&#039;<br \/>\n               sh &#039;docker build -t ${IMAGE_NAME} -f Dockerfile ${WS}\/${IMAGE_NAME}\/target\/&#039;<br \/>\n            }<br \/>\n        }<\/p>\n<p>        stage(&#039;4.\u90e8\u7f72&#039;){<br \/>\n            \/\/ \u5220\u9664\u5bb9\u5668\u548c\u865a\u60ac\u955c\u50cf<br \/>\n            steps {<br \/>\n               sh &#039;pwd &amp;&amp; ls -alh&#039;<br \/>\n               sh &#039;docker rm -f ${IMAGE_NAME} || true &amp;&amp; docker rmi $(docker images -q -f dangling&#061;true) || true&#039;<br \/>\n               sh &#039;docker run -d -p 8888:8080 &#8211;name ${IMAGE_NAME} -v \/mydata\/logs\/${IMAGE_NAME}:\/logs\/${IMAGE_NAME} ${IMAGE_NAME}&#039;<br \/>\n            }<br \/>\n        }<br \/>\n    }<br \/>\n}<\/p>\n<h5>redis<\/h5>\n<p>  redis:<br \/>\n    host: 111.231.74.191 # \u5730\u5740<br \/>\n    port: 6379 # \u7aef\u53e3<br \/>\n    database: 1 # \u6570\u636e\u5e93\u7d22\u5f15<br \/>\n    password: 123456 # \u5bc6\u7801&#xff0c;\u5efa\u8bae\u751f\u4ea7\u73af\u5883\u5f00\u542f<\/p>\n<h5>\u521b\u5efa\u6570\u636e\u5e93ry-vuw&#xff0c;\u6267\u884c\u521d\u59cb\u5316sql<\/h5>\n<h4>2.\u524d\u7aef\u914d\u7f6e<\/h4>\n<p>1\u3001\u5728\u524d\u7aef\u9879\u76eeruoyi-ui\u4e2d\u7f16\u5199Dockerfile\u548cJenkinsfile\u4e24\u4e2a\u6587\u4ef6, \u5e76\u521b\u5efa\u4e24\u4e2a\u73af\u5883\u7684nginx\u7684\u914d\u7f6e\u6587\u4ef6(\u524d\u7aef\u9879\u76ee\u8981\u5728nginx\u4e2d\u8fd0\u884c), \u6848\u4f8b\u6f14\u793a\u4e24\u4e2anginx\u7684\u914d\u7f6e\u6587\u4ef6\u9664\u4e86\u540d\u5b57\u4e0d\u540c, \u91cc\u9762\u7684\u5185\u5bb9\u662f\u4e00\u76f8\u540c<\/p>\n<h5>Dockerfile<\/h5>\n<p>FROM nginx:1.22<\/p>\n<p># \u6784\u5efa\u53c2\u6570,\u5728Jenkinsfile\u4e2d\u6784\u5efa\u955c\u50cf\u65f6\u5b9a\u4e49<br \/>\nARG PROFILE<\/p>\n<p># \u5c06dist\u6587\u4ef6\u4e2d\u7684\u5185\u5bb9\u590d\u5236\u5230 &#096;\/usr\/share\/nginx\/html\/&#096; \u8fd9\u4e2a\u76ee\u5f55\u4e0b\u9762<br \/>\nCOPY dist\/  \/usr\/share\/nginx\/html\/<\/p>\n<p># \u7528\u672c\u5730\u914d\u7f6e\u6587\u4ef6\u6765\u66ff\u6362nginx\u955c\u50cf\u91cc\u7684\u9ed8\u8ba4\u914d\u7f6e<br \/>\nCOPY nginx\/nginx-${PROFILE}.conf \/etc\/nginx\/nginx.conf<\/p>\n<p>EXPOSE 80<\/p>\n<p># \u4ee5\u524d\u53f0\u5f62\u5f0f\u6301\u7eed\u8fd0\u884c<br \/>\nCMD [&#034;nginx&#034;, &#034;-g&#034;, &#034;daemon off;&#034;]<\/p>\n<h5>jenkinsfile<\/h5>\n<p>pipeline{<br \/>\n    agent any<br \/>\n    environment {<br \/>\n      \/\/ \u955c\u50cf\u540d\u79f0<br \/>\n      IMAGE_NAME &#061; &#034;ruoyi-ui&#034;<br \/>\n      \/\/ \u5de5\u4f5c\u76ee\u5f55<br \/>\n      WS &#061; &#034;${WORKSPACE}&#034;<br \/>\n      \/\/ \u540e\u53f0\u9879\u76ee\u955c\u50cf\u540d\u79f0<br \/>\n      API_IMAGE_NAME &#061; &#034;ruoyi-admin&#034;<br \/>\n      \/\/ \u81ea\u5b9a\u4e49\u7684\u6784\u5efa\u53c2\u6570<br \/>\n      PROFILE &#061; &#034;prod&#034;<br \/>\n    }<\/p>\n<p>    \/\/\u5b9a\u4e49\u6d41\u6c34\u7ebf\u7684\u52a0\u5de5\u6d41\u7a0b<br \/>\n    stages {<br \/>\n        \/\/\u6d41\u6c34\u7ebf\u7684\u6240\u6709\u9636\u6bb5<br \/>\n        stage(&#039;1.\u73af\u5883\u68c0\u67e5&#039;){<br \/>\n            steps {<br \/>\n               sh &#039;pwd &amp;&amp; ls -alh&#039;<br \/>\n               sh &#039;printenv&#039;<br \/>\n               sh &#039;docker version&#039;<br \/>\n               sh &#039;git &#8211;version&#039;<br \/>\n            }<br \/>\n        }<\/p>\n<p>        stage(&#039;2.\u7f16\u8bd1&#039;){<br \/>\n            agent {<br \/>\n                docker {<br \/>\n                    image &#039;node:12-alpine&#039;<br \/>\n                 }<br \/>\n            }<br \/>\n            steps {<br \/>\n               sh &#039;pwd &amp;&amp; ls -alh&#039;<br \/>\n               sh &#039;node -v&#039;<br \/>\n               sh &#039;cd ${WS} &amp;&amp; npm install &#8211;registry&#061;https:\/\/registry.npmmirror.com &#8211;no-fund &amp;&amp; npm run build:prod&#039;<br \/>\n            }<br \/>\n        }<\/p>\n<p>        stage(&#039;3.\u6253\u5305&#039;){<br \/>\n            steps {<br \/>\n               sh &#039;pwd &amp;&amp; ls -alh&#039;<br \/>\n               sh &#039;docker build &#8211;build-arg PROFILE&#061;${PROFILE} -t ${IMAGE_NAME} .&#039;<br \/>\n            }<br \/>\n        }<\/p>\n<p>        stage(&#039;4.\u90e8\u7f72&#039;){<br \/>\n            \/\/ \u5220\u9664\u5bb9\u5668\u548c\u865a\u60ac\u955c\u50cf<br \/>\n            steps {<br \/>\n               sh &#039;pwd &amp;&amp; ls -alh&#039;<br \/>\n               sh &#039;docker rm -f ${IMAGE_NAME} || true &amp;&amp; docker rmi $(docker images -q -f dangling&#061;true) || true&#039;<br \/>\n               sh &#039;docker run -d -p 8889:80 &#8211;name ${IMAGE_NAME} &#8211;link ruoyi-admin:ruoyi-admin ${IMAGE_NAME}&#039;<br \/>\n            }<br \/>\n        }<br \/>\n    }<br \/>\n}<\/p>\n<h5>nginx<\/h5>\n<p>worker_processes  1;<\/p>\n<p>events {<br \/>\n    worker_connections  1024;<br \/>\n}<\/p>\n<p>http {<br \/>\n    include       mime.types;<br \/>\n    default_type  application\/octet-stream;<br \/>\n    sendfile        on;<br \/>\n    keepalive_timeout  65;<\/p>\n<p>    server {<br \/>\n        listen       80;<br \/>\n        server_name  localhost;<\/p>\n<p>      location \/ {<br \/>\n            root   \/usr\/share\/nginx\/html;<br \/>\n         try_files $uri $uri\/ \/index.html;<br \/>\n            index  index.html index.htm;<br \/>\n        }<\/p>\n<p>      location \/prod-api\/{<br \/>\n         proxy_set_header Host $http_host;<br \/>\n         proxy_set_header X-Real-IP $remote_addr;<br \/>\n         proxy_set_header REMOTE-HOST $remote_addr;<br \/>\n         proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<br \/>\n         #\u8bbf\u95ee\u5bb9\u5668\u5730\u5740<br \/>\n         proxy_pass http:\/\/ruoyi-admin:8080\/;<br \/>\n         #\u8bbf\u95ee\u5916\u7f51\u5730\u5740, \u540e\u53f0\u5bb9\u5668\u7aef\u53e3\u6620\u5c048888:8080<br \/>\n         #proxy_pass http:\/\/47.114.186.174:8888\/;<br \/>\n      }<\/p>\n<p>        error_page   500 502 503 504  \/50x.html;<br \/>\n        location &#061; \/50x.html {<br \/>\n            root   html;<br \/>\n        }<br \/>\n    }<br \/>\n}<\/p>\n<h3>8\u3001\u5c06\u524d\u540e\u7aef\u4e24\u4e2a\u9879\u76ee\u4e0a\u4f20\u5230\u79c1\u4ebagitlab<\/h3>\n<p>gitlab\u5b89\u88c5&#xff1a;<\/p>\n<p>\u4e0a\u4f20\u8fc7\u7a0b\u5ffd\u7565\u3002\u8fd9\u4e2a\u6bd4\u8f83\u7b80\u5355\u3002<\/p>\n<p>ruoyi-ui<\/p>\n<p>ruoyi<\/p>\n<h3>9\u3001jenkins\u5168\u5c40\u5de5\u5177\u914d\u7f6e&#xff08;\u8fd9\u4e2a\u8fc7\u7a0b\u53ef\u4ee5\u5ffd\u7565&#xff0c;\u8c8c\u4f3c\u6ca1\u7528\u4e0a&#xff09;<\/h3>\n<h4>1\u3001maven\u914d\u7f6e<\/h4>\n<p>\/usr\/local\/maven\/conf\/setting.xml<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418100218-6802232a2a1ef.png\" alt=\"image-20240428143942578\" \/><\/p>\n<h4>2\u3001JDK\u5b89\u88c5<\/h4>\n<p>jdk\u914d\u7f6e JAVA_HOME<\/p>\n<h5>1.\u4f7f\u7528jdk8<\/h5>\n<p>\/usr\/local\/java<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418100218-6802232a8c721.png\" alt=\"image-20240428145323594\" \/><\/p>\n<h5>2.\u4e5f\u53ef\u4ee5\u4f7f\u7528\u9ed8\u8ba4\u7684jdk11<\/h5>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418100218-6802232ad8f33.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<h5>3.\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\u8fdb\u884cdocker\u81ea\u5e26\u7684jdk\u7684\u67e5\u627e<\/h5>\n<p># which java<br \/>\n\/opt\/java\/openjdk\/bin\/java<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418100219-6802232b16963.png\" alt=\"image-20240428143637941\" \/><\/p>\n<h4>3\u3001maven\u5b89\u88c5<\/h4>\n<p>\/usr\/local\/maven<\/p>\n<p>\u6ce8\u610f\u7a7a\u683c\u95ee\u9898&#xff01;&#xff01;<\/p>\n<h4>4\u3001docker\u5b89\u88c5<\/h4>\n<p>docker info<\/p>\n<p> Docker Root Dir: \/var\/lib\/docker<br \/>\n ##\u5c06\u8fd9\u4e2a\u6620\u5c04\u5230docker\u8def\u5f84<\/p>\n<p>\/usr\/local\/docker<br \/>\n##\u53c2\u8003<br \/>\nhttps:\/\/blog.csdn.net\/yprufeng\/article\/details\/136320990<br \/>\nhttps:\/\/blog.csdn.net\/weixin_43202160\/article\/details\/134416447<\/p>\n<p>\u4fe1\u606f\u8bf4\u660e<\/p>\n<p>\u5728\u60a8\u63d0\u4f9b\u7684\u4fe1\u606f\u4e2d&#xff0c;\/usr\/bin\/docker \u662f Docker \u7684\u53ef\u6267\u884c\u6587\u4ef6\u6240\u5728\u7684\u4f4d\u7f6e&#xff0c;\u5b83\u901a\u5e38\u88ab\u8ba4\u4e3a\u662f Docker \u7684\u5b89\u88c5\u76ee\u5f55\u3002<\/p>\n<p>\u867d\u7136 \/var\/lib\/docker \u662f Docker \u7684\u6839\u76ee\u5f55&#xff0c;\u5176\u4e2d\u5305\u542b Docker \u7684\u6570\u636e\u3001\u955c\u50cf\u548c\u5bb9\u5668\u7b49&#xff0c;\u4f46\u4e00\u822c\u60c5\u51b5\u4e0b&#xff0c;\/usr\/bin\/docker \u88ab\u8ba4\u4e3a\u662f Docker \u7684\u53ef\u6267\u884c\u6587\u4ef6\u7684\u5b89\u88c5\u8def\u5f84\u3002<\/p>\n<p>\u8bf7\u6ce8\u610f&#xff0c;\u5177\u4f53\u7684\u5b89\u88c5\u76ee\u5f55\u53ef\u80fd\u56e0\u4e0d\u540c\u7684\u7cfb\u7edf\u548c\u5b89\u88c5\u65b9\u5f0f\u800c\u6709\u6240\u4e0d\u540c\u3002\u4e0a\u8ff0\u89e3\u91ca\u662f\u4e00\u822c\u60c5\u51b5\u4e0b\u7684\u60c5\u51b5&#xff0c;\u5177\u4f53\u7ed3\u679c\u53ef\u80fd\u4f1a\u56e0\u4e0d\u540c\u7684\u7cfb\u7edf\u548c\u914d\u7f6e\u800c\u6709\u6240\u4e0d\u540c\u3002\u5982\u679c\u60a8\u4f7f\u7528\u4e86\u7279\u5b9a\u7684\u5b89\u88c5\u65b9\u5f0f&#xff0c;\u8bf7\u63d0\u4f9b\u66f4\u591a\u7684\u8be6\u7ec6\u4fe1\u606f\u4ee5\u4fbf\u6211\u4eec\u7ed9\u51fa\u66f4\u51c6\u786e\u7684\u7b54\u6848\u3002<\/p>\n<p>\u5f00\u542fdocker\u670d\u52a1\u5668\u7684\u8fdc\u7a0b\u8bbf\u95ee\u94fe\u63a5<\/p>\n<ul>\n<li>\n<p>\u5728docker\u6240\u5728\u670d\u52a1\u5668\u4e0a\u7684\/usr\/lib\/systemd\/system\/docker.service\u6587\u4ef6\u4e2d\u5f00\u542fdocker\u8fdc\u7a0b\u8bbf\u95ee<\/p>\n<p> ExecStart&#061;\/usr\/bin\/dockerd -H tcp:\/\/0.0.0.0:2375 -H unix:\/\/\/var\/run\/docker.sock\n <\/li>\n<\/ul>\n<p>\u5728jenkins\u4e2d\u914d\u7f6e\u8be5docker\u670d\u52a1<\/p>\n<ul>\n<li>&#8211; \u5728\u7cfb\u7edf\u7ba1\u7406-&gt;\u8282\u70b9\u548c\u4e91\u7ba1\u7406\u4e2d\u914d\u7f6edocker\u670d\u52a1<\/li>\n<li>&#8211; \u53ef\u5728\u7cfb\u7edf\u7ba1\u7406-&gt;docker\u7ec4\u4ef6\u4e2d\u67e5\u770b\u5df2\u7ecf\u542f\u52a8\u7684\u5bb9\u5668\u548c\u5b89\u88c5\u7684\u955c\u50cf<\/li>\n<li>** jenkins\u51ed\u636e\u4e2d\u914d\u7f6edocker harbor\u51ed\u636e&#xff0c;\u7528\u4e8e\u5c06\u955c\u50cf\u63a8\u9001\u5230harbor\u4ed3\u5e93\u4ee5\u53ca\u62c9\u53d6\u955c\u50cf\u4f7f\u7528&#xff0c;\u5173\u4e8eharbor\u4ed3\u5e93\u7684\u5b89\u88c5&#xff0c;\u8fd9\u91cc\u4e0d\u505a\u4ecb\u7ecd&#xff0c;\u53ef\u67e5\u770b\u4f5c\u8005\u5f80\u671f\u535a\u5ba2\u5185\u5bb9**<\/li>\n<\/ul>\n<p>\u53ef\u4ee5\u4e86\u3002\u8981\u6620\u5c04\u5b8c\u6210\u624d\u884c\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418100219-6802232b1ff07.png\" alt=\"image-20240428153351648\" \/><\/p>\n<p>harbor\u7684\u53c2\u8003\u5730\u5740&#xff1a;https:\/\/blog.51cto.com\/wst021sh\/7245687<\/p>\n<p>docker inspect OR <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418100219-6802232b5ee90.png\" alt=\"image-20240428144349452\" \/><\/p>\n<h4>5\u3001\u914d\u7f6ejenkins\u7684\u7cfb\u7edf\u914d\u7f6e<\/h4>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418100219-6802232bd8a29.png\" alt=\"image-20240429091629817\" \/><\/p>\n<h4>6\u3001\u914d\u7f6e\u597d\u6784\u5efa\u540e\u64cd\u4f5c<\/h4>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418100220-6802232ce347d.png\" alt=\"image-20240429091716794\" \/><\/p>\n<p>\u4f1a\u628aSSH Server\u81ea\u52a8\u5e26\u5165\u8fc7\u6765\u3002<\/p>\n<h5>6.1\u3001\u672c\u673a\u6784\u5efa<\/h5>\n<p>#\u6267\u884cshell<br \/>\nAPP_NAME&#061;test-project<br \/>\nAPP_PORT&#061;8083<br \/>\nRUN_ENV&#061;prod<br \/>\ncd \/var\/jenkins_home\/workspace\/$APP_NAME<br \/>\ndocker stop $APP_NAME || true<br \/>\ndocker rm $APP_NAME || true<br \/>\ndocker rmi $APP_NAME || true<br \/>\ndocker build -f src\/docker\/Dockerfile -t $APP_NAME .<br \/>\ndocker run -d -p $APP_PORT:$APP_PORT -e &#034;SPRING_PROFILES_ACTIVE&#061;$RUN_ENV&#034; &#8211;name $APP_NAME $APP_NAME:latest<\/p>\n<h5>6.2\u3001\u90e8\u7f72\u5230\u6307\u5b9a\u670d\u52a1\u5668 jar\u5305\u7248\u672c<\/h5>\n<p>cd \/data\/test<br \/>\nps -ef | grep uht-sf-express-center-0.0.1-SNAPSHOT.jar  | grep -v grep | awk &#039;{printf $2}&#039; | xargs kill -9<br \/>\nnohup java -jar uht-sf-express-center-0.0.1-SNAPSHOT.jar &#8211;spring.profiles.active&#061;prod &gt; uht-sf-express-center.log 2&gt;&amp;1 &amp;<\/p>\n<h5>6.3\u3001\u4f7f\u7528pipLine<\/h5>\n<p>https:\/\/www.cnblogs.com\/juelian\/p\/17782048.html<\/p>\n<h5>pipeline\u8bed\u6cd5<\/h5>\n<p>pipeline\u8bed\u6cd5\u6709\u4e24\u79cd<\/p>\n<ul>\n<li>Declarative Pipeline(\u58f0\u660e\u5f0f)&#xff0c;\u63a8\u8350\u4f7f\u7528\u3002<\/li>\n<li>Scripted Pipeline&#xff08;\u811a\u672c\u5f0f&#xff09;&#xff0c;\u65e7\u7248&#xff0c;\u5f88\u5c11\u7528\u4e86\u3002<\/li>\n<\/ul>\n<h4>7\u3001git\u914d\u7f6e<\/h4>\n<p>http:\/\/111.231.74.191:9980\/\/my-group\/ruoyi.git<br \/>\nroot<br \/>\n3301359a<\/p>\n<h4>8\u3001\u914d\u7f6e\u4e0bmaven \u73af\u5883\u53d8\u91cf<\/h4>\n<p>docker cp \/opt\/etc\/profile jenkins:\/etc\/profile<br \/>\n\u8fdb\u5165\u5bb9\u5668\u5185<br \/>\nsource \/etc\/profile<\/p>\n<p>\u4fee\u6539\/etc\/profile<\/p>\n<h4>9\u3001\u8fdc\u7a0b\u670d\u52a1\u5668\u6267\u884c\u7684\u811a\u672c<\/h4>\n<p>echo &#039;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;\u62c9\u53d6\u6700\u65b0\u955c\u50cf&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#039;<br \/>\ndocker pull $docker_registry\/docker_storage\/$JOB_NAME<\/p>\n<p>echo &#039;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;\u5220\u9664\u6e05\u7406\u5bb9\u5668\u955c\u50cf&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#039;<br \/>\nif [ -n  &#034;$(docker ps -a -f  name&#061;$JOB_NAME  &#8211;format &#039;{{.ID}}&#039; )&#034; ]<br \/>\n then<br \/>\n #\u5220\u9664\u4e4b\u524d\u7684\u5bb9\u5668<br \/>\n docker rm -f $(docker ps -a -f  name&#061;$JOB_NAME  &#8211;format &#039;{{.ID}}&#039; )<br \/>\nfi<br \/>\n # \u6e05\u7406\u955c\u50cf<br \/>\ndocker image prune -f <\/p>\n<p>echo &#039;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;\u542f\u52a8\u5bb9\u5668&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#039;<br \/>\ndocker run -d   &#8211;net&#061;host -e PARAMS&#061;&#034;&#8211;spring.profiles.active&#061;prod&#034; &#8211;name $JOB_NAME $docker_registry\/docker_storage\/$JOB_NAME<\/p>\n<h4>10\u3001\u5173\u952e\u63d2\u4ef6\u5b89\u88c5\u3002<\/h4>\n<p>dockerpip line&#xff0c;Jenkinsfile \u5176\u4e2d\u7684agent docker\u9700\u8981\u7528\u5230\u3002<\/p>\n<h3>11\u3001\u5f00\u59cb\u914d\u7f6e\u9879\u76ee<\/h3>\n<h4>1.\u65b0\u5efa\u4efb\u52a1\u2013\u591a\u5206\u652f\u6d41\u6c34\u7ebf<\/h4>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418100222-6802232e28a8a.png\" alt=\"image-20240429171526238\" \/><\/p>\n<h4>2.\u914d\u7f6e\u4e0bgit\u6e90<\/h4>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418100222-6802232e80e4f.png\" alt=\"image-20240429171748503\" \/><\/p>\n<h4>3.\u8fd0\u884c\u5c31\u53ef\u4ee5\u4e86&#xff0c;\u6210\u529f&#xff01;&#xff01;<\/h4>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418100223-6802232f1cf2e.png\" alt=\"image-20240429170931860\" \/><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418100223-6802232f68ad9.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>tips:<\/p>\n<p>#\u8981\u4e3a\u5176\u6dfb\u52a0\u6302\u8f7d\u5377&#xff08;volume&#xff09;<br \/>\ndocker container update &#8211;mount source&#061;\/host\/path,target&#061;\/container\/path,readonly&#061;false container_name_or_id<\/p>\n<p>\u53c8\u662f\u4e00\u4e2a\u9519\u8bef\u3002<\/p>\n<p>\u6211\u7684jenkins\u662fdocker\u90e8\u7f72\u7684<\/p>\n<p>\u9700\u8981\u5728jenkins\u7684\u5bb9\u5668\u91cc \u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\u8bbf\u95eegit\u4e0a\u7684\u4ed3\u5e93\u5730\u5740&#xff0c;\u628agit\u7684\u4e3b\u673a\u6dfb\u52a0\u5230\/root\/.ssh\/known_hosts(\u6267\u884c\u547d\u4ee4\u524dknown_hosts\u8fd9\u4e2a\u6587\u4ef6\u662f\u4e0d\u5b58\u5728\u7684&#xff0c;\u6267\u884c\u540e\u5c31\u6709\u4e86)<\/p>\n<p>root&#064;80b05f3c5097:~\/.ssh# git ls-remote -h git&#064;gitee.com:XXXXX\/autotest.git HEAD<br \/>\nThe authenticity of host &#039;gitee.com (212.64.63.215)&#039; can&#039;t be established.<br \/>\nECDSA key fingerprint is SHA256:FQGC9Kn\/eye1W8icdBgrQp&#043;KkGYoFgbVr17bmjey0Wc.<br \/>\nAre you sure you want to continue connecting (yes\/no\/[fingerprint])? yes<br \/>\nWarning: Permanently added &#039;gitee.com,212.64.63.215&#039; (ECDSA) to the list of known hosts.<br \/>\nroot&#064;80b05f3c5097:~\/.ssh#<br \/>\nroot&#064;80b05f3c5097:~\/.ssh#<br \/>\nroot&#064;80b05f3c5097:~\/.ssh# pwd<br \/>\n\/root\/.ssh<br \/>\nroot&#064;80b05f3c5097:~\/.ssh# ls -al<br \/>\ntotal 12<br \/>\ndrwx&#8212;&#8212; 2 root root 57 Oct 25 03:55 .<br \/>\ndrwx&#8212;&#8212; 1 root root 71 Sep 28 04:49 ..<br \/>\n-rw&#8212;&#8212;- 1 root root 2602 Oct 25 02:42 id_rsa<br \/>\n-rw-r&#8211;r&#8211; 1 root root 571 Oct 25 02:42 id_rsa.pub<br \/>\n-rw-r&#8211;r&#8211; 1 root root 444 Oct 25 03:55 ls<\/p>\n<p>\u7136\u540ejenkins\u5c31\u4e0d\u62a5\u9519\u4e86<\/p>\n<p>ssh &lt;\u7528\u6237\u540d&gt;&#064;&lt;\u8282\u70b9\u670d\u52a1\u5668IP&gt;<\/p>\n<p>ssh root&#064;&lt;\u8282\u70b9\u670d\u52a1\u5668IP&gt;<\/p>\n<p>ssh git&#064;111.231.74.191:9922<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418100223-6802232faa144.png\" alt=\"image-20240429151521090\" \/><\/p>\n<p>1.\u5148\u5207\u6362\u5230jenkins\u7528\u6237\u4e0b&#xff08;\u6b64\u65f6\u5728jenkins\u5b89\u88c5\u76ee\u5f55\u4e0b&#xff09;<\/p>\n<p>sudo su -s \/bin\/bash jenkins<br \/>\ncd ~<\/p>\n<p>ssh-keygen -m PEM -t rsa -f id_rsa<br \/>\n# ssh-keygen -t rsa&#xff08;\u8fd9\u4e2a\u4e0d\u884c&#xff09;<\/p>\n<h4><\/h4>\n<p><span class=\"token function\">cat<\/span> .ssh\/id_rsa.pub<br \/>\n\u6216\u8005<br \/>\n<span class=\"token function\">cat<\/span> id_rsa.pub<\/p>\n<p>ssh:\/\/git&#064;111.231.74.191:9922\/my-group\/ruoyi.git<br \/>\nmain<\/p>\n<p>http:\/\/111.231.74.191:9980\/my-group\/ruoyi.git<br \/>\nroot<br \/>\n3301359a<br \/>\ngitlab<\/p>\n<p>maven\u914d\u7f6e\u7684\u95ee\u9898<\/p>\n<p>\/usr\/local\/maven\/conf\/settings.xml<\/p>\n<p>package -s \u201c\/usr\/local\/maven\/conf\/settings.xml\u201d -Dmaven.test.skip&#061;true\u2019<\/p>\n<p>10\u3001\u7ec8\u4e8e\u6210\u529f\u4e86&#xff01;&#xff01;\u8d70\u4e86\u4e00\u5929\u7684\u6b6a\u8def\u3002\u3002\u3002\u7eaf\u7eaf\u7684\u4e00\u4e2a\u4eba\u778e\u7422\u78e8\u3002<\/p>\n<p>\u7136\u540e\u5c31\u8fd0\u884c\u5c31\u884c\u4e86\u3002&#xff01;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1w\u6b21\uff0c\u70b9\u8d5e14\u6b21\uff0c\u6536\u85cf41\u6b21\u3002Docker\u5b89\u88c5jenkins\uff0c\u914d\u7f6e\u73af\u5883\uff0c\u6700\u5168\uff0c\u5df2\u6210\u529f\u9a8c\u8bc1\u3002_jenkins 2.346.1<\/p>\n","protected":false},"author":2,"featured_media":10459,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[27,392,393,453],"topic":[],"class_list":["post-10472","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-docker","tag-jenkins","tag-maven","tag-453"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>24\u5e74\u6700\u65b0 Docker\u5b89\u88c5jenkins\u5e76\u53d1\u5e03\u670d\u52a1\u5668\uff0c\u914d\u7f6e\u73af\u5883\uff0c\u6700\u5168\uff0c\u5df2\u6210\u529f\u9a8c\u8bc1\u3002 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/10472.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"24\u5e74\u6700\u65b0 Docker\u5b89\u88c5jenkins\u5e76\u53d1\u5e03\u670d\u52a1\u5668\uff0c\u914d\u7f6e\u73af\u5883\uff0c\u6700\u5168\uff0c\u5df2\u6210\u529f\u9a8c\u8bc1\u3002 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1w\u6b21\uff0c\u70b9\u8d5e14\u6b21\uff0c\u6536\u85cf41\u6b21\u3002Docker\u5b89\u88c5jenkins\uff0c\u914d\u7f6e\u73af\u5883\uff0c\u6700\u5168\uff0c\u5df2\u6210\u529f\u9a8c\u8bc1\u3002_jenkins 2.346.1\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/10472.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-04-18T10:02:24+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418100218-6802232a2a1ef.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/10472.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/10472.html\",\"name\":\"24\u5e74\u6700\u65b0 Docker\u5b89\u88c5jenkins\u5e76\u53d1\u5e03\u670d\u52a1\u5668\uff0c\u914d\u7f6e\u73af\u5883\uff0c\u6700\u5168\uff0c\u5df2\u6210\u529f\u9a8c\u8bc1\u3002 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-04-18T10:02:24+00:00\",\"dateModified\":\"2025-04-18T10:02:24+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/10472.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/10472.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/10472.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"24\u5e74\u6700\u65b0 Docker\u5b89\u88c5jenkins\u5e76\u53d1\u5e03\u670d\u52a1\u5668\uff0c\u914d\u7f6e\u73af\u5883\uff0c\u6700\u5168\uff0c\u5df2\u6210\u529f\u9a8c\u8bc1\u3002\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"24\u5e74\u6700\u65b0 Docker\u5b89\u88c5jenkins\u5e76\u53d1\u5e03\u670d\u52a1\u5668\uff0c\u914d\u7f6e\u73af\u5883\uff0c\u6700\u5168\uff0c\u5df2\u6210\u529f\u9a8c\u8bc1\u3002 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/10472.html","og_locale":"zh_CN","og_type":"article","og_title":"24\u5e74\u6700\u65b0 Docker\u5b89\u88c5jenkins\u5e76\u53d1\u5e03\u670d\u52a1\u5668\uff0c\u914d\u7f6e\u73af\u5883\uff0c\u6700\u5168\uff0c\u5df2\u6210\u529f\u9a8c\u8bc1\u3002 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1w\u6b21\uff0c\u70b9\u8d5e14\u6b21\uff0c\u6536\u85cf41\u6b21\u3002Docker\u5b89\u88c5jenkins\uff0c\u914d\u7f6e\u73af\u5883\uff0c\u6700\u5168\uff0c\u5df2\u6210\u529f\u9a8c\u8bc1\u3002_jenkins 2.346.1","og_url":"https:\/\/www.wsisp.com\/helps\/10472.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-04-18T10:02:24+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418100218-6802232a2a1ef.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"7 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/10472.html","url":"https:\/\/www.wsisp.com\/helps\/10472.html","name":"24\u5e74\u6700\u65b0 Docker\u5b89\u88c5jenkins\u5e76\u53d1\u5e03\u670d\u52a1\u5668\uff0c\u914d\u7f6e\u73af\u5883\uff0c\u6700\u5168\uff0c\u5df2\u6210\u529f\u9a8c\u8bc1\u3002 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-04-18T10:02:24+00:00","dateModified":"2025-04-18T10:02:24+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/10472.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/10472.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/10472.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"24\u5e74\u6700\u65b0 Docker\u5b89\u88c5jenkins\u5e76\u53d1\u5e03\u670d\u52a1\u5668\uff0c\u914d\u7f6e\u73af\u5883\uff0c\u6700\u5168\uff0c\u5df2\u6210\u529f\u9a8c\u8bc1\u3002"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/10472","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=10472"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/10472\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/10459"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=10472"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=10472"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=10472"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=10472"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}