古井不波 發表於 2019-11-19 15:36:00

Jenkins+docker+git+Gitee 部署SpringBoot项目

<div class="output_wrapper" id="output_wrapper_id" style="font-size: 15px; color: rgba(62, 62, 62, 1); line-height: 1.8; word-spacing: 2px; letter-spacing: 2px; font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif; background-image: linear-gradient(90deg, rgba(50, 0, 0, 0.05) 3%, rgba(0, 0, 0, 0) 3%), linear-gradient(360deg, rgba(50, 0, 0, 0.05) 3%, rgba(0, 0, 0, 0) 3%); background-size: 20px 20px; background-position: center"><blockquote style="line-height: inherit; display: block; padding: 15px 15px 15px 1rem; font-size: 0.9em; margin: 1em 0; color: rgba(0, 0, 0, 1); border-left: 5px solid rgba(239, 112, 96, 1); background: rgba(239, 235, 233, 1); overflow: auto; overflow-wrap: normal; word-break: normal">
<p style="font-size: inherit; color: inherit; line-height: inherit; padding: 0; margin: 0">开发离不开项目的部署,运维,因此为了以后的开发便利,我最近学习了下服务的自运维,现在总结一下<br>参考:https://my.oschina.net/yimingkeji/blog/2878371</p>
</blockquote>
<h3 id="h" style="color: inherit; line-height: inherit; padding: 0; margin: 1.6em 0; font-weight: bold; border-bottom: 2px solid rgba(239, 112, 96, 1); font-size: 1.3em"><span style="font-size: inherit; line-height: inherit; margin: 0 3px 0 0; display: inline-block; font-weight: normal; background: rgba(239, 112, 96, 1); color: rgba(255, 255, 255, 1); padding: 3px 10px 1px; border-top-right-radius: 3px; border-top-left-radius: 3px">技术</span><span style="display: inline-block; vertical-align: bottom; border-bottom: 36px solid rgba(239, 235, 233, 1); border-right: 20px solid rgba(0, 0, 0, 0)"> </span></h3>
<p style="font-size: inherit; color: inherit; line-height: inherit; padding: 0; margin: 1.7em 0">Jenkins+docker+git+Gitee部署SpringBoot项目</p>
<h3 id="h-1" style="color: inherit; line-height: inherit; padding: 0; margin: 1.6em 0; font-weight: bold; border-bottom: 2px solid rgba(239, 112, 96, 1); font-size: 1.3em"><span style="font-size: inherit; line-height: inherit; margin: 0 3px 0 0; display: inline-block; font-weight: normal; background: rgba(239, 112, 96, 1); color: rgba(255, 255, 255, 1); padding: 3px 10px 1px; border-top-right-radius: 3px; border-top-left-radius: 3px">环境</span><span style="display: inline-block; vertical-align: bottom; border-bottom: 36px solid rgba(239, 235, 233, 1); border-right: 20px solid rgba(0, 0, 0, 0)"> </span></h3>
<ul style="font-size: inherit; color: inherit; line-height: inherit; margin: 0; padding: 0 0 0 32px; list-style-type: disc">
<li style="font-size: inherit; color: inherit; line-height: inherit; margin: 0 0 0.5em; padding: 0"><span style="font-size: inherit; color: inherit; line-height: inherit; margin: 0; padding: 0">Win10</span></li>
<li style="font-size: inherit; color: inherit; line-height: inherit; margin: 0 0 0.5em; padding: 0"><span style="font-size: inherit; color: inherit; line-height: inherit; margin: 0; padding: 0">虚拟机:VMware</span></li>
<li style="font-size: inherit; color: inherit; line-height: inherit; margin: 0 0 0.5em; padding: 0"><span style="font-size: inherit; color: inherit; line-height: inherit; margin: 0; padding: 0">系统:centos7</span></li>
</ul>
<h3 id="h-2" style="color: inherit; line-height: inherit; padding: 0; margin: 1.6em 0; font-weight: bold; border-bottom: 2px solid rgba(239, 112, 96, 1); font-size: 1.3em"><span style="font-size: inherit; line-height: inherit; margin: 0 3px 0 0; display: inline-block; font-weight: normal; background: rgba(239, 112, 96, 1); color: rgba(255, 255, 255, 1); padding: 3px 10px 1px; border-top-right-radius: 3px; border-top-left-radius: 3px">操作流程</span><span style="display: inline-block; vertical-align: bottom; border-bottom: 36px solid rgba(239, 235, 233, 1); border-right: 20px solid rgba(0, 0, 0, 0)"> </span></h3>
<h4 id="h1centos" style="color: inherit; line-height: inherit; padding: 0; margin: 1.6em 0; font-weight: bold; font-size: 1.2em"><span style="font-size: inherit; color: inherit; line-height: inherit; margin: 0; padding: 0">1.安装虚拟机,配置centos系统,联通网络</span></h4>
<h4 id="h2java" style="color: inherit; line-height: inherit; padding: 0; margin: 1.6em 0; font-weight: bold; font-size: 1.2em"><span style="font-size: inherit; color: inherit; line-height: inherit; margin: 0; padding: 0">2.配置Java环境</span></h4>
<h4 id="h3jenkins" style="color: inherit; line-height: inherit; padding: 0; margin: 1.6em 0; font-weight: bold; font-size: 1.2em"><span style="font-size: inherit; color: inherit; line-height: inherit; margin: 0; padding: 0">3.下载,安装,配置jenkins</span></h4>
<p style="font-size: inherit; color: inherit; line-height: inherit; padding: 0; margin: 1.7em 0"><strong style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; font-weight: bold; color: rgba(233, 105, 0, 1)">1)Jenkins的介绍</strong><br>Jenkins是一个广泛用于持续构建的可视化web工具,可用于自动化与构建、测试、交付或部署软件相关的各种任务。<br><strong style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; font-weight: bold; color: rgba(233, 105, 0, 1)">2)看下Jenkins的工作流程</strong></p>
<ol style="font-size: inherit; color: inherit; line-height: inherit; margin: 0; padding: 0 0 0 32px; list-style-type: decimal">
<li style="font-size: inherit; color: inherit; line-height: inherit; margin: 0 0 0.5em; padding: 0"><span style="font-size: inherit; color: inherit; line-height: inherit; margin: 0; padding: 0">我们在本地开发项目。记得加上dcoker的依赖和Dockerfile的配置(后面说)。然后通过本地git提交到码云(Github)。</span></li>
<li style="font-size: inherit; color: inherit; line-height: inherit; margin: 0 0 0.5em; padding: 0">这时码云上的项目中配置钩子程序(Webhooks)。当我们在本地push的时候触发钩子。<br>这个URL的地址要触发Jenkis(后面介绍)</li>
</ol>
<figure style="font-size: inherit; color: inherit; line-height: inherit; margin: 0; padding: 0"><img src="https://upload-images.jianshu.io/upload_images/11243907-3e8583b39bb968fe.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240"><figcaption style="line-height: inherit; margin: 10px 0 0; padding: 0; text-align: center; color: rgba(153, 153, 153, 1); font-size: 0.7em">image.png</figcaption></figure><br><figure style="font-size: inherit; color: inherit; line-height: inherit; margin: 0; padding: 0"><img src="https://upload-images.jianshu.io/upload_images/11243907-8f01b61517016e37.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240"><figcaption style="line-height: inherit; margin: 10px 0 0; padding: 0; text-align: center; color: rgba(153, 153, 153, 1); font-size: 0.7em">image.png</figcaption></figure>
<ol start="3" style="font-size: inherit; color: inherit; line-height: inherit; margin: 0; padding: 0 0 0 32px; list-style-type: decimal">
<li style="font-size: inherit; color: inherit; line-height: inherit; margin: 0 0 0.5em; padding: 0"><span style="font-size: inherit; color: inherit; line-height: inherit; margin: 0; padding: 0">Jenkins接收到通知以后,会调用虚拟机上的git。将远程码云仓库的项目pull到服务器上</span></li>
<li style="font-size: inherit; color: inherit; line-height: inherit; margin: 0 0 0.5em; padding: 0"><span style="font-size: inherit; color: inherit; line-height: inherit; margin: 0; padding: 0">接下来的工作中心就在Jenkins上。根据配置(后面详细说),将项目用服务器上mvn打成jar包</span></li>
<li style="font-size: inherit; color: inherit; line-height: inherit; margin: 0 0 0.5em; padding: 0"><span style="font-size: inherit; color: inherit; line-height: inherit; margin: 0; padding: 0">利用docker结合项目的dockerfile,打包成docker镜像,然后启动即可。(具体配置看后面)</span></li>
</ol>
<p style="font-size: inherit; color: inherit; line-height: inherit; padding: 0; margin: 1.7em 0"><strong style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; font-weight: bold; color: rgba(233, 105, 0, 1)">3)Jenkins的下载和安装</strong><br>看参考即可</p>
<blockquote style="line-height: inherit; display: block; padding: 15px 15px 15px 1rem; font-size: 0.9em; margin: 1em 0; color: rgba(0, 0, 0, 1); border-left: 5px solid rgba(239, 112, 96, 1); background: rgba(239, 235, 233, 1); overflow: auto; overflow-wrap: normal; word-break: normal">
<p style="font-size: inherit; color: inherit; line-height: inherit; padding: 0; margin: 0">不同的是我没有安装到tomcat下面,随tomcat启动,而是直接安装linux中,然后设置启动<br>这可以百度下</p>
</blockquote>
<h4 id="h4docker" style="color: inherit; line-height: inherit; padding: 0; margin: 1.6em 0; font-weight: bold; font-size: 1.2em"><span style="font-size: inherit; color: inherit; line-height: inherit; margin: 0; padding: 0">4.配置docker</span></h4>
<ol style="font-size: inherit; color: inherit; line-height: inherit; margin: 0; padding: 0 0 0 32px; list-style-type: decimal">
<li style="font-size: inherit; color: inherit; line-height: inherit; margin: 0 0 0.5em; padding: 0"><span style="font-size: inherit; color: inherit; line-height: inherit; margin: 0; padding: 0">首先是插件的安装,可以看参考,会遇到无法连接到外网服务器的问题,百度解决即可</span></li>
<li style="font-size: inherit; color: inherit; line-height: inherit; margin: 0 0 0.5em; padding: 0"><span style="font-size: inherit; color: inherit; line-height: inherit; margin: 0; padding: 0">进去后,首先全局配置,-》看参考    配置maven、JDK、Docker、git</span></li>
</ol>
<blockquote style="line-height: inherit; display: block; padding: 15px 15px 15px 1rem; font-size: 0.9em; margin: 1em 0; color: rgba(0, 0, 0, 1); border-left: 5px solid rgba(239, 112, 96, 1); background: rgba(239, 235, 233, 1); overflow: auto; overflow-wrap: normal; word-break: normal">
<p style="font-size: inherit; color: inherit; line-height: inherit; padding: 0; margin: 0">这些都需要安装到服务器上,git还需生成私钥,公钥。公钥放到码云远程仓库,私钥放到Jenkins上,使得通过Jenkin利用git将代码拉到服务器上。</p>
</blockquote>
<ol start="3" style="font-size: inherit; color: inherit; line-height: inherit; margin: 0; padding: 0 0 0 32px; list-style-type: decimal">
<li style="font-size: inherit; color: inherit; line-height: inherit; margin: 0 0 0.5em; padding: 0"><span style="font-size: inherit; color: inherit; line-height: inherit; margin: 0; padding: 0">安装docker</span></li>
<li style="font-size: inherit; color: inherit; line-height: inherit; margin: 0 0 0.5em; padding: 0">Springboot项目<br>项目地址:https://gitee.com/yimingkeji/docker-springboot</li>
</ol>
<p style="font-size: inherit; color: inherit; line-height: inherit; padding: 0; margin: 1.7em 0">docker依赖</p>
<pre style="font-size: inherit; color: inherit; line-height: inherit; margin: 0; padding: 0"><code class="hljs xml" style="overflow-wrap: break-word; margin: 0 2px; line-height: 18px; font-size: 14px; font-weight: normal; word-spacing: 0; letter-spacing: 0; font-family: Consolas, Inconsolata, Courier, monospace; border-radius: 0; color: rgba(169, 183, 198, 1); background: rgba(40, 43, 46, 1); overflow-x: auto; padding: 0.5em; white-space: pre !important; word-wrap: normal !important; word-break: normal !important; overflow: auto !important"><span class="hljs-comment" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(128, 128, 128, 1); word-wrap: inherit !important; word-break: inherit !important">&lt;!--&nbsp;Docker&nbsp;maven&nbsp;plugin&nbsp;start&nbsp;--&gt;</span><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="hljs-tag" style="font-size: inherit; color: inherit; line-height: inherit; margin: 0; padding: 0; word-wrap: inherit !important; word-break: inherit !important">&lt;<span class="hljs-name" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(248, 35, 117, 1); word-wrap: inherit !important; word-break: inherit !important">plugin</span>&gt;</span><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="hljs-tag" style="font-size: inherit; color: inherit; line-height: inherit; margin: 0; padding: 0; word-wrap: inherit !important; word-break: inherit !important">&lt;<span class="hljs-name" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(248, 35, 117, 1); word-wrap: inherit !important; word-break: inherit !important">groupId</span>&gt;</span>com.spotify<span class="hljs-tag" style="font-size: inherit; color: inherit; line-height: inherit; margin: 0; padding: 0; word-wrap: inherit !important; word-break: inherit !important">&lt;/<span class="hljs-name" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(248, 35, 117, 1); word-wrap: inherit !important; word-break: inherit !important">groupId</span>&gt;</span><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="hljs-tag" style="font-size: inherit; color: inherit; line-height: inherit; margin: 0; padding: 0; word-wrap: inherit !important; word-break: inherit !important">&lt;<span class="hljs-name" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(248, 35, 117, 1); word-wrap: inherit !important; word-break: inherit !important">artifactId</span>&gt;</span>docker-maven-plugin<span class="hljs-tag" style="font-size: inherit; color: inherit; line-height: inherit; margin: 0; padding: 0; word-wrap: inherit !important; word-break: inherit !important">&lt;/<span class="hljs-name" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(248, 35, 117, 1); word-wrap: inherit !important; word-break: inherit !important">artifactId</span>&gt;</span><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="hljs-tag" style="font-size: inherit; color: inherit; line-height: inherit; margin: 0; padding: 0; word-wrap: inherit !important; word-break: inherit !important">&lt;<span class="hljs-name" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(248, 35, 117, 1); word-wrap: inherit !important; word-break: inherit !important">version</span>&gt;</span>0.4.13<span class="hljs-tag" style="font-size: inherit; color: inherit; line-height: inherit; margin: 0; padding: 0; word-wrap: inherit !important; word-break: inherit !important">&lt;/<span class="hljs-name" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(248, 35, 117, 1); word-wrap: inherit !important; word-break: inherit !important">version</span>&gt;</span><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="hljs-tag" style="font-size: inherit; color: inherit; line-height: inherit; margin: 0; padding: 0; word-wrap: inherit !important; word-break: inherit !important">&lt;<span class="hljs-name" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(248, 35, 117, 1); word-wrap: inherit !important; word-break: inherit !important">configuration</span>&gt;</span><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="hljs-tag" style="font-size: inherit; color: inherit; line-height: inherit; margin: 0; padding: 0; word-wrap: inherit !important; word-break: inherit !important">&lt;<span class="hljs-name" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(248, 35, 117, 1); word-wrap: inherit !important; word-break: inherit !important">imageName</span>&gt;</span>${project.artifactId}<span class="hljs-tag" style="font-size: inherit; color: inherit; line-height: inherit; margin: 0; padding: 0; word-wrap: inherit !important; word-break: inherit !important">&lt;/<span class="hljs-name" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(248, 35, 117, 1); word-wrap: inherit !important; word-break: inherit !important">imageName</span>&gt;</span><span class="hljs-comment" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(128, 128, 128, 1); word-wrap: inherit !important; word-break: inherit !important">&lt;!--&nbsp;不然docker:build会报错--&gt;</span><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="hljs-tag" style="font-size: inherit; color: inherit; line-height: inherit; margin: 0; padding: 0; word-wrap: inherit !important; word-break: inherit !important">&lt;<span class="hljs-name" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(248, 35, 117, 1); word-wrap: inherit !important; word-break: inherit !important">dockerDirectory</span>&gt;</span>${project.basedir}/src/main/docker<span class="hljs-tag" style="font-size: inherit; color: inherit; line-height: inherit; margin: 0; padding: 0; word-wrap: inherit !important; word-break: inherit !important">&lt;/<span class="hljs-name" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(248, 35, 117, 1); word-wrap: inherit !important; word-break: inherit !important">dockerDirectory</span>&gt;</span><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="hljs-comment" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(128, 128, 128, 1); word-wrap: inherit !important; word-break: inherit !important">&lt;!--dockerfile的地址--&gt;</span><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="hljs-tag" style="font-size: inherit; color: inherit; line-height: inherit; margin: 0; padding: 0; word-wrap: inherit !important; word-break: inherit !important">&lt;<span class="hljs-name" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(248, 35, 117, 1); word-wrap: inherit !important; word-break: inherit !important">resources</span>&gt;</span><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="hljs-tag" style="font-size: inherit; color: inherit; line-height: inherit; margin: 0; padding: 0; word-wrap: inherit !important; word-break: inherit !important">&lt;<span class="hljs-name" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(248, 35, 117, 1); word-wrap: inherit !important; word-break: inherit !important">resource</span>&gt;</span><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="hljs-tag" style="font-size: inherit; color: inherit; line-height: inherit; margin: 0; padding: 0; word-wrap: inherit !important; word-break: inherit !important">&lt;<span class="hljs-name" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(248, 35, 117, 1); word-wrap: inherit !important; word-break: inherit !important">targetPath</span>&gt;</span>/<span class="hljs-tag" style="font-size: inherit; color: inherit; line-height: inherit; margin: 0; padding: 0; word-wrap: inherit !important; word-break: inherit !important">&lt;/<span class="hljs-name" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(248, 35, 117, 1); word-wrap: inherit !important; word-break: inherit !important">targetPath</span>&gt;</span><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="hljs-tag" style="font-size: inherit; color: inherit; line-height: inherit; margin: 0; padding: 0; word-wrap: inherit !important; word-break: inherit !important">&lt;<span class="hljs-name" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(248, 35, 117, 1); word-wrap: inherit !important; word-break: inherit !important">directory</span>&gt;</span>${project.build.directory}<span class="hljs-tag" style="font-size: inherit; color: inherit; line-height: inherit; margin: 0; padding: 0; word-wrap: inherit !important; word-break: inherit !important">&lt;/<span class="hljs-name" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(248, 35, 117, 1); word-wrap: inherit !important; word-break: inherit !important">directory</span>&gt;</span><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="hljs-tag" style="font-size: inherit; color: inherit; line-height: inherit; margin: 0; padding: 0; word-wrap: inherit !important; word-break: inherit !important">&lt;<span class="hljs-name" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(248, 35, 117, 1); word-wrap: inherit !important; word-break: inherit !important">include</span>&gt;</span>${project.build.finalName}.jar<span class="hljs-tag" style="font-size: inherit; color: inherit; line-height: inherit; margin: 0; padding: 0; word-wrap: inherit !important; word-break: inherit !important">&lt;/<span class="hljs-name" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(248, 35, 117, 1); word-wrap: inherit !important; word-break: inherit !important">include</span>&gt;</span><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="hljs-tag" style="font-size: inherit; color: inherit; line-height: inherit; margin: 0; padding: 0; word-wrap: inherit !important; word-break: inherit !important">&lt;/<span class="hljs-name" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(248, 35, 117, 1); word-wrap: inherit !important; word-break: inherit !important">resource</span>&gt;</span><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="hljs-tag" style="font-size: inherit; color: inherit; line-height: inherit; margin: 0; padding: 0; word-wrap: inherit !important; word-break: inherit !important">&lt;/<span class="hljs-name" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(248, 35, 117, 1); word-wrap: inherit !important; word-break: inherit !important">resources</span>&gt;</span><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="hljs-tag" style="font-size: inherit; color: inherit; line-height: inherit; margin: 0; padding: 0; word-wrap: inherit !important; word-break: inherit !important">&lt;/<span class="hljs-name" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(248, 35, 117, 1); word-wrap: inherit !important; word-break: inherit !important">configuration</span>&gt;</span><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="hljs-tag" style="font-size: inherit; color: inherit; line-height: inherit; margin: 0; padding: 0; word-wrap: inherit !important; word-break: inherit !important">&lt;/<span class="hljs-name" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(248, 35, 117, 1); word-wrap: inherit !important; word-break: inherit !important">plugin</span>&gt;</span><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="hljs-comment" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(128, 128, 128, 1); word-wrap: inherit !important; word-break: inherit !important">&lt;!--&nbsp;Docker&nbsp;maven&nbsp;plugin&nbsp;end&nbsp;--&gt;</span><br></code></pre>
<hr style="font-size: inherit; color: inherit; line-height: inherit; padding: 0; height: 1px; margin: 1.5rem 0; border-right: none; border-bottom: none; border-left: none; border-top: 1px dashed rgba(165, 165, 165, 1)">
<pre style="font-size: inherit; color: inherit; line-height: inherit; margin: 0; padding: 0"><code class="hljs vbnet" style="overflow-wrap: break-word; margin: 0 2px; line-height: 18px; font-size: 14px; font-weight: normal; word-spacing: 0; letter-spacing: 0; font-family: Consolas, Inconsolata, Courier, monospace; border-radius: 0; color: rgba(169, 183, 198, 1); background: rgba(40, 43, 46, 1); overflow-x: auto; padding: 0.5em; white-space: pre !important; word-wrap: normal !important; word-break: normal !important; overflow: auto !important">Dockerfile内容:<br><span class="hljs-keyword" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(248, 35, 117, 1); word-wrap: inherit !important; word-break: inherit !important">FROM</span>&nbsp;hub.c<span class="hljs-number" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(174, 135, 250, 1); word-wrap: inherit !important; word-break: inherit !important">.163</span>.com/dwyane/openjdk:<span class="hljs-number" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(174, 135, 250, 1); word-wrap: inherit !important; word-break: inherit !important">8</span><br>VOLUME&nbsp;/tmp<br>ADD&nbsp;docker-test<span class="hljs-number" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(174, 135, 250, 1); word-wrap: inherit !important; word-break: inherit !important">-0.0</span><span class="hljs-number" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(174, 135, 250, 1); word-wrap: inherit !important; word-break: inherit !important">.1</span>-SNAPSHOT.jar&nbsp;app.jar<br>ENTRYPOINT&nbsp;[<span class="hljs-string" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(238, 220, 112, 1); word-wrap: inherit !important; word-break: inherit !important">"java"</span>,<span class="hljs-string" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(238, 220, 112, 1); word-wrap: inherit !important; word-break: inherit !important">"-Djava.security.egd=file:/dev/./urandom"</span>,<span class="hljs-string" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(238, 220, 112, 1); word-wrap: inherit !important; word-break: inherit !important">"-jar"</span>,<span class="hljs-string" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(238, 220, 112, 1); word-wrap: inherit !important; word-break: inherit !important">"/app.jar"</span>]<br>EXPOSE&nbsp;<span class="hljs-number" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(174, 135, 250, 1); word-wrap: inherit !important; word-break: inherit !important">8081</span><br></code></pre>
<blockquote style="line-height: inherit; display: block; padding: 15px 15px 15px 1rem; font-size: 0.9em; margin: 1em 0; color: rgba(0, 0, 0, 1); border-left: 5px solid rgba(239, 112, 96, 1); background: rgba(239, 235, 233, 1); overflow: auto; overflow-wrap: normal; word-break: normal">
<p style="font-size: inherit; color: inherit; line-height: inherit; padding: 0; margin: 0">dockerfile的jar包的名字要和项目的名字保持一致</p>
</blockquote>
<pre style="font-size: inherit; color: inherit; line-height: inherit; margin: 0; padding: 0"><code class="hljs xml" style="overflow-wrap: break-word; margin: 0 2px; line-height: 18px; font-size: 14px; font-weight: normal; word-spacing: 0; letter-spacing: 0; font-family: Consolas, Inconsolata, Courier, monospace; border-radius: 0; color: rgba(169, 183, 198, 1); background: rgba(40, 43, 46, 1); overflow-x: auto; padding: 0.5em; white-space: pre !important; word-wrap: normal !important; word-break: normal !important; overflow: auto !important"><span class="hljs-tag" style="font-size: inherit; color: inherit; line-height: inherit; margin: 0; padding: 0; word-wrap: inherit !important; word-break: inherit !important">&lt;<span class="hljs-name" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(248, 35, 117, 1); word-wrap: inherit !important; word-break: inherit !important">groupId</span>&gt;</span>com.wuhen<span class="hljs-tag" style="font-size: inherit; color: inherit; line-height: inherit; margin: 0; padding: 0; word-wrap: inherit !important; word-break: inherit !important">&lt;/<span class="hljs-name" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(248, 35, 117, 1); word-wrap: inherit !important; word-break: inherit !important">groupId</span>&gt;</span><br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="hljs-tag" style="font-size: inherit; color: inherit; line-height: inherit; margin: 0; padding: 0; word-wrap: inherit !important; word-break: inherit !important">&lt;<span class="hljs-name" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(248, 35, 117, 1); word-wrap: inherit !important; word-break: inherit !important">artifactId</span>&gt;</span>docker-test<span class="hljs-tag" style="font-size: inherit; color: inherit; line-height: inherit; margin: 0; padding: 0; word-wrap: inherit !important; word-break: inherit !important">&lt;/<span class="hljs-name" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(248, 35, 117, 1); word-wrap: inherit !important; word-break: inherit !important">artifactId</span>&gt;</span><br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="hljs-tag" style="font-size: inherit; color: inherit; line-height: inherit; margin: 0; padding: 0; word-wrap: inherit !important; word-break: inherit !important">&lt;<span class="hljs-name" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(248, 35, 117, 1); word-wrap: inherit !important; word-break: inherit !important">version</span>&gt;</span>0.0.1-SNAPSHOT<span class="hljs-tag" style="font-size: inherit; color: inherit; line-height: inherit; margin: 0; padding: 0; word-wrap: inherit !important; word-break: inherit !important">&lt;/<span class="hljs-name" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(248, 35, 117, 1); word-wrap: inherit !important; word-break: inherit !important">version</span>&gt;</span><br></code></pre>
<p style="font-size: inherit; color: inherit; line-height: inherit; padding: 0; margin: 1.7em 0">然后上传到自己的码云远程仓库</p>
<h4 id="h5jenkinsdocker" style="color: inherit; line-height: inherit; padding: 0; margin: 1.6em 0; font-weight: bold; font-size: 1.2em"><span style="font-size: inherit; color: inherit; line-height: inherit; margin: 0; padding: 0">5.使用Jenkins部署项目到docker</span></h4>
<p style="font-size: inherit; color: inherit; line-height: inherit; padding: 0; margin: 1.7em 0">看参考<br>其中<br><strong style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; font-weight: bold; color: rgba(233, 105, 0, 1)">第一次执行shell 添加shell:</strong></p>
<pre style="font-size: inherit; color: inherit; line-height: inherit; margin: 0; padding: 0"><code class="hljs bash" style="overflow-wrap: break-word; margin: 0 2px; line-height: 18px; font-size: 14px; font-weight: normal; word-spacing: 0; letter-spacing: 0; font-family: Consolas, Inconsolata, Courier, monospace; border-radius: 0; color: rgba(169, 183, 198, 1); background: rgba(40, 43, 46, 1); overflow-x: auto; padding: 0.5em; white-space: pre !important; word-wrap: normal !important; word-break: normal !important; overflow: auto !important"><span class="hljs-comment" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(128, 128, 128, 1); word-wrap: inherit !important; word-break: inherit !important">#!/bin/bash&nbsp;-il</span><br>mvn&nbsp;docker:build<br><span class="hljs-built_in" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(248, 35, 117, 1); word-wrap: inherit !important; word-break: inherit !important">echo</span>&nbsp;<span class="hljs-string" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(238, 220, 112, 1); word-wrap: inherit !important; word-break: inherit !important">"当前docker&nbsp;镜像:"</span><br>docker&nbsp;images&nbsp;|&nbsp;grep&nbsp;docker-test<br><span class="hljs-built_in" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(248, 35, 117, 1); word-wrap: inherit !important; word-break: inherit !important">echo</span>&nbsp;<span class="hljs-string" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(238, 220, 112, 1); word-wrap: inherit !important; word-break: inherit !important">"启动容器-----&gt;"</span><br>docker&nbsp;run&nbsp;--name&nbsp;dockertest&nbsp;-p&nbsp;8081:8081&nbsp;-d&nbsp;docker-test<br><span class="hljs-built_in" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(248, 35, 117, 1); word-wrap: inherit !important; word-break: inherit !important">echo</span>&nbsp;<span class="hljs-string" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(238, 220, 112, 1); word-wrap: inherit !important; word-break: inherit !important">"启动服务成功!"</span><br></code></pre>
<p style="font-size: inherit; color: inherit; line-height: inherit; padding: 0; margin: 1.7em 0">项目构建成功后再次构建shell有所改变</p>
<pre style="font-size: inherit; color: inherit; line-height: inherit; margin: 0; padding: 0"><code class="hljs bash" style="overflow-wrap: break-word; margin: 0 2px; line-height: 18px; font-size: 14px; font-weight: normal; word-spacing: 0; letter-spacing: 0; font-family: Consolas, Inconsolata, Courier, monospace; border-radius: 0; color: rgba(169, 183, 198, 1); background: rgba(40, 43, 46, 1); overflow-x: auto; padding: 0.5em; white-space: pre !important; word-wrap: normal !important; word-break: normal !important; overflow: auto !important"><span class="hljs-comment" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(128, 128, 128, 1); word-wrap: inherit !important; word-break: inherit !important">#!/bin/bash&nbsp;-il</span><br><span class="hljs-comment" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(128, 128, 128, 1); word-wrap: inherit !important; word-break: inherit !important">#&nbsp;先删除之前的容器</span><br><span class="hljs-built_in" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(248, 35, 117, 1); word-wrap: inherit !important; word-break: inherit !important">echo</span>&nbsp;<span class="hljs-string" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(238, 220, 112, 1); word-wrap: inherit !important; word-break: inherit !important">"remobe&nbsp;old&nbsp;container"</span><br>docker&nbsp;ps&nbsp;-a&nbsp;|&nbsp;grep&nbsp;dockertest&nbsp;|&nbsp;awk&nbsp;<span class="hljs-string" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(238, 220, 112, 1); word-wrap: inherit !important; word-break: inherit !important">'{print&nbsp;$1}'</span>|&nbsp;xargs&nbsp;docker&nbsp;rm&nbsp;-f<br><span class="hljs-comment" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(128, 128, 128, 1); word-wrap: inherit !important; word-break: inherit !important">#&nbsp;删除之前的镜像</span><br><span class="hljs-built_in" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(248, 35, 117, 1); word-wrap: inherit !important; word-break: inherit !important">echo</span>&nbsp;<span class="hljs-string" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(238, 220, 112, 1); word-wrap: inherit !important; word-break: inherit !important">"romove&nbsp;old&nbsp;image"</span><br>docker&nbsp;rmi&nbsp;docker-test<br><span class="hljs-comment" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(128, 128, 128, 1); word-wrap: inherit !important; word-break: inherit !important">#&nbsp;构建镜像</span><br>mvn&nbsp;docker:build<br><span class="hljs-comment" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(128, 128, 128, 1); word-wrap: inherit !important; word-break: inherit !important">#&nbsp;打印当前镜像</span><br><span class="hljs-built_in" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(248, 35, 117, 1); word-wrap: inherit !important; word-break: inherit !important">echo</span>&nbsp;<span class="hljs-string" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(238, 220, 112, 1); word-wrap: inherit !important; word-break: inherit !important">"current&nbsp;docker&nbsp;images"</span><br>docker&nbsp;images&nbsp;|&nbsp;grep&nbsp;docker-test<br><span class="hljs-comment" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(128, 128, 128, 1); word-wrap: inherit !important; word-break: inherit !important">#&nbsp;启动容器</span><br><span class="hljs-built_in" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(248, 35, 117, 1); word-wrap: inherit !important; word-break: inherit !important">echo</span>&nbsp;<span class="hljs-string" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(238, 220, 112, 1); word-wrap: inherit !important; word-break: inherit !important">"start&nbsp;container"</span><br>docker&nbsp;run&nbsp;--name&nbsp;dockertest&nbsp;-p&nbsp;8081:8081&nbsp;-d&nbsp;docker-test<br><span class="hljs-comment" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(128, 128, 128, 1); word-wrap: inherit !important; word-break: inherit !important">#&nbsp;打印当前容器</span><br><span class="hljs-built_in" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(248, 35, 117, 1); word-wrap: inherit !important; word-break: inherit !important">echo</span>&nbsp;<span class="hljs-string" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(238, 220, 112, 1); word-wrap: inherit !important; word-break: inherit !important">"current&nbsp;container"</span><br>docker&nbsp;ps&nbsp;-a&nbsp;|&nbsp;grep&nbsp;dockertest<br><span class="hljs-built_in" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(248, 35, 117, 1); word-wrap: inherit !important; word-break: inherit !important">echo</span>&nbsp;<span class="hljs-string" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(238, 220, 112, 1); word-wrap: inherit !important; word-break: inherit !important">"star&nbsp;service&nbsp;success!"</span><br></code></pre>
<blockquote style="line-height: inherit; display: block; padding: 15px 15px 15px 1rem; font-size: 0.9em; margin: 1em 0; color: rgba(0, 0, 0, 1); border-left: 5px solid rgba(239, 112, 96, 1); background: rgba(239, 235, 233, 1); overflow: auto; overflow-wrap: normal; word-break: normal">
<p style="font-size: inherit; color: inherit; line-height: inherit; padding: 0; margin: 0">这个容器端口映射:项目的启动端口好为8081,映射到外部服务器端口为8081(可以固定。也可以随机),所以在外部浏览器访问IP:8081,即映射到项目上,添加路径即可访问</p>
</blockquote>
<p style="font-size: inherit; color: inherit; line-height: inherit; padding: 0; margin: 1.7em 0"><strong style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; font-weight: bold; color: rgba(233, 105, 0, 1)">控制台输出</strong></p>
<pre style="font-size: inherit; color: inherit; line-height: inherit; margin: 0; padding: 0"><code class="hljs lua" style="overflow-wrap: break-word; margin: 0 2px; line-height: 18px; font-size: 14px; font-weight: normal; word-spacing: 0; letter-spacing: 0; font-family: Consolas, Inconsolata, Courier, monospace; border-radius: 0; color: rgba(169, 183, 198, 1); background: rgba(40, 43, 46, 1); overflow-x: auto; padding: 0.5em; white-space: pre !important; word-wrap: normal !important; word-break: normal !important; overflow: auto !important">Started&nbsp;by&nbsp;user&nbsp;unknown&nbsp;<span class="hljs-keyword" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(248, 35, 117, 1); word-wrap: inherit !important; word-break: inherit !important">or</span>&nbsp;anonymous<br>Running&nbsp;as&nbsp;SYSTEM<br>Building&nbsp;<span class="hljs-keyword" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(248, 35, 117, 1); word-wrap: inherit !important; word-break: inherit !important">in</span>&nbsp;workspace&nbsp;/var/lib/jenkins/workspace/docker-test<br>&nbsp;&gt;&nbsp;/usr/bin/git&nbsp;rev-parse&nbsp;<span class="hljs-comment" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(128, 128, 128, 1); word-wrap: inherit !important; word-break: inherit !important">--is-inside-work-tree&nbsp;#&nbsp;timeout=10</span><br>Fetching&nbsp;changes&nbsp;from&nbsp;the&nbsp;remote&nbsp;Git&nbsp;repository<br>&nbsp;&gt;&nbsp;/usr/bin/git&nbsp;<span class="hljs-built_in" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(248, 35, 117, 1); word-wrap: inherit !important; word-break: inherit !important">config</span>&nbsp;remote.origin.url&nbsp;git@gitee.com:zhege/docker-test.git&nbsp;#&nbsp;timeout=<span class="hljs-number" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(174, 135, 250, 1); word-wrap: inherit !important; word-break: inherit !important">10</span><br>Fetching&nbsp;upstream&nbsp;changes&nbsp;from&nbsp;git@gitee.com:zhege/docker-test.git<br>&nbsp;&gt;&nbsp;/usr/bin/git&nbsp;<span class="hljs-comment" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(128, 128, 128, 1); word-wrap: inherit !important; word-break: inherit !important">--version&nbsp;#&nbsp;timeout=10</span><br>using&nbsp;GIT_SSH&nbsp;to&nbsp;set&nbsp;credentials&nbsp;gitee<br>&nbsp;&gt;&nbsp;/usr/bin/git&nbsp;fetch&nbsp;<span class="hljs-comment" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(128, 128, 128, 1); word-wrap: inherit !important; word-break: inherit !important">--tags&nbsp;--progress&nbsp;git@gitee.com:zhege/docker-test.git&nbsp;+refs/heads/*:refs/remotes/origin/*</span><br>&nbsp;&gt;&nbsp;/usr/bin/git&nbsp;rev-parse&nbsp;refs/remotes/origin/master^{commit}&nbsp;#&nbsp;timeout=<span class="hljs-number" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(174, 135, 250, 1); word-wrap: inherit !important; word-break: inherit !important">10</span><br>&nbsp;&gt;&nbsp;/usr/bin/git&nbsp;rev-parse&nbsp;refs/remotes/origin/origin/master^{commit}&nbsp;#&nbsp;timeout=<span class="hljs-number" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(174, 135, 250, 1); word-wrap: inherit !important; word-break: inherit !important">10</span><br>Checking&nbsp;out&nbsp;Revision&nbsp;<span class="hljs-number" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(174, 135, 250, 1); word-wrap: inherit !important; word-break: inherit !important">8</span>b9c5e5cdda5cf060be846f2c53b9662cd8d1c7f&nbsp;(refs/remotes/origin/master)<br>&nbsp;&gt;&nbsp;/usr/bin/git&nbsp;<span class="hljs-built_in" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(248, 35, 117, 1); word-wrap: inherit !important; word-break: inherit !important">config</span>&nbsp;core.sparsecheckout&nbsp;#&nbsp;timeout=<span class="hljs-number" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(174, 135, 250, 1); word-wrap: inherit !important; word-break: inherit !important">10</span><br>&nbsp;&gt;&nbsp;/usr/bin/git&nbsp;checkout&nbsp;-f&nbsp;<span class="hljs-number" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(174, 135, 250, 1); word-wrap: inherit !important; word-break: inherit !important">8</span>b9c5e5cdda5cf060be846f2c53b9662cd8d1c7f<br>Commit&nbsp;message:&nbsp;<span class="hljs-string" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(238, 220, 112, 1); word-wrap: inherit !important; word-break: inherit !important">"测试0.8"</span><br>&nbsp;&gt;&nbsp;/usr/bin/git&nbsp;rev-list&nbsp;<span class="hljs-comment" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(128, 128, 128, 1); word-wrap: inherit !important; word-break: inherit !important">--no-walk&nbsp;8b9c5e5cdda5cf060be846f2c53b9662cd8d1c7f&nbsp;#&nbsp;timeout=10</span><br>&nbsp;$&nbsp;/usr/<span class="hljs-keyword" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(248, 35, 117, 1); word-wrap: inherit !important; word-break: inherit !important">local</span>/maven/apache-maven/bin/mvn&nbsp;-s&nbsp;/usr/<span class="hljs-keyword" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(248, 35, 117, 1); word-wrap: inherit !important; word-break: inherit !important">local</span>/maven/apache-maven/conf/settings.xml&nbsp;-gs&nbsp;/usr/<span class="hljs-keyword" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(248, 35, 117, 1); word-wrap: inherit !important; word-break: inherit !important">local</span>/maven/apache-maven/conf/settings.xml&nbsp;clean&nbsp;install&nbsp;-Dmaven.test.skip=<span class="hljs-literal" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(174, 135, 250, 1); word-wrap: inherit !important; word-break: inherit !important">true</span><br>&nbsp;Scanning&nbsp;<span class="hljs-keyword" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(248, 35, 117, 1); word-wrap: inherit !important; word-break: inherit !important">for</span>&nbsp;projects...<br>&nbsp;<br>&nbsp;<span class="hljs-comment" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(128, 128, 128, 1); word-wrap: inherit !important; word-break: inherit !important">-----------------------&lt;&nbsp;com.wuhen:docker-test&nbsp;&gt;------------------------</span><br>&nbsp;Building&nbsp;docker-test&nbsp;<span class="hljs-number" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(174, 135, 250, 1); word-wrap: inherit !important; word-break: inherit !important">0.0</span><span class="hljs-number" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(174, 135, 250, 1); word-wrap: inherit !important; word-break: inherit !important">.1</span>-SNAPSHOT<br>&nbsp;<span class="hljs-comment" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(128, 128, 128, 1); word-wrap: inherit !important; word-break: inherit !important">--------------------------------[&nbsp;jar&nbsp;]---------------------------------</span><br>&nbsp;<br>&nbsp;<span class="hljs-comment" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(128, 128, 128, 1); word-wrap: inherit !important; word-break: inherit !important">---&nbsp;maven-clean-plugin:3.1.0:clean&nbsp;(default-clean)&nbsp;@&nbsp;docker-test&nbsp;---</span><br>&nbsp;Deleting&nbsp;/var/lib/jenkins/workspace/docker-test/target<br>&nbsp;<br>&nbsp;<span class="hljs-comment" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(128, 128, 128, 1); word-wrap: inherit !important; word-break: inherit !important">---&nbsp;maven-resources-plugin:3.1.0:resources&nbsp;(default-resources)&nbsp;@&nbsp;docker-test&nbsp;---</span><br>&nbsp;Using&nbsp;<span class="hljs-string" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(238, 220, 112, 1); word-wrap: inherit !important; word-break: inherit !important">'UTF-8'</span>&nbsp;encoding&nbsp;to&nbsp;copy&nbsp;filtered&nbsp;resources.<br>&nbsp;Copying&nbsp;<span class="hljs-number" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(174, 135, 250, 1); word-wrap: inherit !important; word-break: inherit !important">1</span>&nbsp;resource<br>&nbsp;Copying&nbsp;<span class="hljs-number" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(174, 135, 250, 1); word-wrap: inherit !important; word-break: inherit !important">0</span>&nbsp;resource<br>&nbsp;<br>&nbsp;<span class="hljs-comment" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(128, 128, 128, 1); word-wrap: inherit !important; word-break: inherit !important">---&nbsp;maven-compiler-plugin:3.8.1:compile&nbsp;(default-compile)&nbsp;@&nbsp;docker-test&nbsp;---</span><br>&nbsp;Changes&nbsp;detected&nbsp;-&nbsp;recompiling&nbsp;the&nbsp;module!<br>&nbsp;Compiling&nbsp;<span class="hljs-number" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(174, 135, 250, 1); word-wrap: inherit !important; word-break: inherit !important">2</span>&nbsp;source&nbsp;files&nbsp;to&nbsp;/var/lib/jenkins/workspace/docker-test/target/classes<br>&nbsp;<br>&nbsp;<span class="hljs-comment" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(128, 128, 128, 1); word-wrap: inherit !important; word-break: inherit !important">---&nbsp;maven-resources-plugin:3.1.0:testResources&nbsp;(default-testResources)&nbsp;@&nbsp;docker-test&nbsp;---</span><br>&nbsp;Not&nbsp;copying&nbsp;test&nbsp;resources<br>&nbsp;<br>&nbsp;<span class="hljs-comment" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(128, 128, 128, 1); word-wrap: inherit !important; word-break: inherit !important">---&nbsp;maven-compiler-plugin:3.8.1:testCompile&nbsp;(default-testCompile)&nbsp;@&nbsp;docker-test&nbsp;---</span><br>&nbsp;Not&nbsp;compiling&nbsp;test&nbsp;sources<br>&nbsp;<br>&nbsp;<span class="hljs-comment" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(128, 128, 128, 1); word-wrap: inherit !important; word-break: inherit !important">---&nbsp;maven-surefire-plugin:2.22.2:test&nbsp;(default-test)&nbsp;@&nbsp;docker-test&nbsp;---</span><br>&nbsp;Tests&nbsp;are&nbsp;skipped.<br>&nbsp;<br>&nbsp;<span class="hljs-comment" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(128, 128, 128, 1); word-wrap: inherit !important; word-break: inherit !important">---&nbsp;maven-jar-plugin:3.1.2:jar&nbsp;(default-jar)&nbsp;@&nbsp;docker-test&nbsp;---</span><br>&nbsp;Building&nbsp;jar:&nbsp;/var/lib/jenkins/workspace/docker-test/target/docker-test<span class="hljs-number" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(174, 135, 250, 1); word-wrap: inherit !important; word-break: inherit !important">-0.0</span><span class="hljs-number" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(174, 135, 250, 1); word-wrap: inherit !important; word-break: inherit !important">.1</span>-SNAPSHOT.jar<br>&nbsp;<br>&nbsp;<span class="hljs-comment" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(128, 128, 128, 1); word-wrap: inherit !important; word-break: inherit !important">---&nbsp;spring-boot-maven-plugin:2.2.1.RELEASE:repackage&nbsp;(repackage)&nbsp;@&nbsp;docker-test&nbsp;---</span><br>&nbsp;Replacing&nbsp;main&nbsp;artifact&nbsp;with&nbsp;repackaged&nbsp;archive<br>&nbsp;<br>&nbsp;<span class="hljs-comment" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(128, 128, 128, 1); word-wrap: inherit !important; word-break: inherit !important">---&nbsp;maven-install-plugin:2.5.2:install&nbsp;(default-install)&nbsp;@&nbsp;docker-test&nbsp;---</span><br>&nbsp;Installing&nbsp;/var/lib/jenkins/workspace/docker-test/target/docker-test<span class="hljs-number" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(174, 135, 250, 1); word-wrap: inherit !important; word-break: inherit !important">-0.0</span><span class="hljs-number" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(174, 135, 250, 1); word-wrap: inherit !important; word-break: inherit !important">.1</span>-SNAPSHOT.jar&nbsp;to&nbsp;/root/.m2/repository/com/wuhen/docker-test/<span class="hljs-number" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(174, 135, 250, 1); word-wrap: inherit !important; word-break: inherit !important">0.0</span><span class="hljs-number" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(174, 135, 250, 1); word-wrap: inherit !important; word-break: inherit !important">.1</span>-SNAPSHOT/docker-test<span class="hljs-number" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(174, 135, 250, 1); word-wrap: inherit !important; word-break: inherit !important">-0.0</span><span class="hljs-number" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(174, 135, 250, 1); word-wrap: inherit !important; word-break: inherit !important">.1</span>-SNAPSHOT.jar<br>&nbsp;Installing&nbsp;/var/lib/jenkins/workspace/docker-test/pom.xml&nbsp;to&nbsp;/root/.m2/repository/com/wuhen/docker-test/<span class="hljs-number" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(174, 135, 250, 1); word-wrap: inherit !important; word-break: inherit !important">0.0</span><span class="hljs-number" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(174, 135, 250, 1); word-wrap: inherit !important; word-break: inherit !important">.1</span>-SNAPSHOT/docker-test<span class="hljs-number" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(174, 135, 250, 1); word-wrap: inherit !important; word-break: inherit !important">-0.0</span><span class="hljs-number" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(174, 135, 250, 1); word-wrap: inherit !important; word-break: inherit !important">.1</span>-SNAPSHOT.pom<br>&nbsp;<span class="hljs-comment" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(128, 128, 128, 1); word-wrap: inherit !important; word-break: inherit !important">------------------------------------------------------------------------</span><br>&nbsp;BUILD&nbsp;SUCCESS<br>&nbsp;<span class="hljs-comment" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(128, 128, 128, 1); word-wrap: inherit !important; word-break: inherit !important">------------------------------------------------------------------------</span><br>&nbsp;Total&nbsp;<span class="hljs-built_in" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(248, 35, 117, 1); word-wrap: inherit !important; word-break: inherit !important">time</span>:&nbsp;&nbsp;<span class="hljs-number" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(174, 135, 250, 1); word-wrap: inherit !important; word-break: inherit !important">3.245</span>&nbsp;s<br>&nbsp;Finished&nbsp;at:&nbsp;<span class="hljs-number" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(174, 135, 250, 1); word-wrap: inherit !important; word-break: inherit !important">2019</span><span class="hljs-number" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(174, 135, 250, 1); word-wrap: inherit !important; word-break: inherit !important">-11</span><span class="hljs-number" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(174, 135, 250, 1); word-wrap: inherit !important; word-break: inherit !important">-19</span>T15:<span class="hljs-number" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(174, 135, 250, 1); word-wrap: inherit !important; word-break: inherit !important">24</span>:<span class="hljs-number" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(174, 135, 250, 1); word-wrap: inherit !important; word-break: inherit !important">43</span>+<span class="hljs-number" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(174, 135, 250, 1); word-wrap: inherit !important; word-break: inherit !important">08</span>:<span class="hljs-number" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(174, 135, 250, 1); word-wrap: inherit !important; word-break: inherit !important">00</span><br>&nbsp;<span class="hljs-comment" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(128, 128, 128, 1); word-wrap: inherit !important; word-break: inherit !important">------------------------------------------------------------------------</span><br>&nbsp;$&nbsp;/bin/bash&nbsp;-il&nbsp;/tmp/jenkins6420905348235517809.sh<br>bash:&nbsp;no&nbsp;job&nbsp;control&nbsp;<span class="hljs-keyword" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(248, 35, 117, 1); word-wrap: inherit !important; word-break: inherit !important">in</span>&nbsp;this&nbsp;shell<br>remobe&nbsp;old&nbsp;container<br><span class="hljs-number" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(174, 135, 250, 1); word-wrap: inherit !important; word-break: inherit !important">8</span>ecc1c0ad528<br>romove&nbsp;old&nbsp;image<br>Untagged:&nbsp;docker-test:latest<br>Deleted:&nbsp;sha256:e21b5d37eec2178a134b2b11ff2c520c9e4195da30514fdf3a9c908c7d1923bc<br>Deleted:&nbsp;sha256:f6687ce9698053b270d31032bba9953d1df257038b356827161a7ef6b3a0d6fa<br>Deleted:&nbsp;sha256:<span class="hljs-number" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(174, 135, 250, 1); word-wrap: inherit !important; word-break: inherit !important">1770755</span>bad3191affc457705afe435cd5d21a60fadd543a67b4df65de66a5cf7<br>Deleted:&nbsp;sha256:<span class="hljs-number" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(174, 135, 250, 1); word-wrap: inherit !important; word-break: inherit !important">0</span>a45f6912e8188a2ef73537590483f7284f12856aab29263bb03f9a41f5d86e8<br>Deleted:&nbsp;sha256:<span class="hljs-number" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(174, 135, 250, 1); word-wrap: inherit !important; word-break: inherit !important">046</span>c6fab78820fb8d39f3c502a882a71841fdbc23ecb18f39bd712e7e9d556bd<br>&nbsp;Scanning&nbsp;<span class="hljs-keyword" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(248, 35, 117, 1); word-wrap: inherit !important; word-break: inherit !important">for</span>&nbsp;projects...<br>&nbsp;<br>&nbsp;<span class="hljs-comment" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(128, 128, 128, 1); word-wrap: inherit !important; word-break: inherit !important">-----------------------&lt;&nbsp;com.wuhen:docker-test&nbsp;&gt;------------------------</span><br>&nbsp;Building&nbsp;docker-test&nbsp;<span class="hljs-number" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(174, 135, 250, 1); word-wrap: inherit !important; word-break: inherit !important">0.0</span><span class="hljs-number" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(174, 135, 250, 1); word-wrap: inherit !important; word-break: inherit !important">.1</span>-SNAPSHOT<br>&nbsp;<span class="hljs-comment" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(128, 128, 128, 1); word-wrap: inherit !important; word-break: inherit !important">--------------------------------[&nbsp;jar&nbsp;]---------------------------------</span><br>&nbsp;<br>&nbsp;<span class="hljs-comment" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(128, 128, 128, 1); word-wrap: inherit !important; word-break: inherit !important">---&nbsp;docker-maven-plugin:0.4.13:build&nbsp;(default-cli)&nbsp;@&nbsp;docker-test&nbsp;---</span><br>&nbsp;Copying&nbsp;/var/lib/jenkins/workspace/docker-test/target/docker-test<span class="hljs-number" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(174, 135, 250, 1); word-wrap: inherit !important; word-break: inherit !important">-0.0</span><span class="hljs-number" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(174, 135, 250, 1); word-wrap: inherit !important; word-break: inherit !important">.1</span>-SNAPSHOT.jar&nbsp;-&gt;&nbsp;/var/lib/jenkins/workspace/docker-test/target/docker/docker-test<span class="hljs-number" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(174, 135, 250, 1); word-wrap: inherit !important; word-break: inherit !important">-0.0</span><span class="hljs-number" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(174, 135, 250, 1); word-wrap: inherit !important; word-break: inherit !important">.1</span>-SNAPSHOT.jar<br>&nbsp;Copying&nbsp;/var/lib/jenkins/workspace/docker-test/src/main/docker/Dockerfile&nbsp;-&gt;&nbsp;/var/lib/jenkins/workspace/docker-test/target/docker/Dockerfile<br>&nbsp;Building&nbsp;image&nbsp;docker-test<br>Step&nbsp;<span class="hljs-number" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(174, 135, 250, 1); word-wrap: inherit !important; word-break: inherit !important">1</span>/<span class="hljs-number" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(174, 135, 250, 1); word-wrap: inherit !important; word-break: inherit !important">5</span>&nbsp;:&nbsp;FROM&nbsp;hub.c<span class="hljs-number" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(174, 135, 250, 1); word-wrap: inherit !important; word-break: inherit !important">.163</span>.com/dwyane/openjdk:<span class="hljs-number" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(174, 135, 250, 1); word-wrap: inherit !important; word-break: inherit !important">8</span><br><br>&nbsp;<span class="hljs-comment" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(128, 128, 128, 1); word-wrap: inherit !important; word-break: inherit !important">---&gt;&nbsp;96cddf5ae9f1</span><br>Step&nbsp;<span class="hljs-number" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(174, 135, 250, 1); word-wrap: inherit !important; word-break: inherit !important">2</span>/<span class="hljs-number" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(174, 135, 250, 1); word-wrap: inherit !important; word-break: inherit !important">5</span>&nbsp;:&nbsp;VOLUME&nbsp;/tmp<br><br>&nbsp;<span class="hljs-comment" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(128, 128, 128, 1); word-wrap: inherit !important; word-break: inherit !important">---&gt;&nbsp;Running&nbsp;in&nbsp;486c1231762b</span><br>Removing&nbsp;intermediate&nbsp;container&nbsp;<span class="hljs-number" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(174, 135, 250, 1); word-wrap: inherit !important; word-break: inherit !important">486</span>c1231762b<br>&nbsp;<span class="hljs-comment" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(128, 128, 128, 1); word-wrap: inherit !important; word-break: inherit !important">---&gt;&nbsp;13ba15843faa</span><br>Step&nbsp;<span class="hljs-number" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(174, 135, 250, 1); word-wrap: inherit !important; word-break: inherit !important">3</span>/<span class="hljs-number" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(174, 135, 250, 1); word-wrap: inherit !important; word-break: inherit !important">5</span>&nbsp;:&nbsp;ADD&nbsp;docker-test<span class="hljs-number" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(174, 135, 250, 1); word-wrap: inherit !important; word-break: inherit !important">-0.0</span><span class="hljs-number" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(174, 135, 250, 1); word-wrap: inherit !important; word-break: inherit !important">.1</span>-SNAPSHOT.jar&nbsp;app.jar<br><br>&nbsp;<span class="hljs-comment" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(128, 128, 128, 1); word-wrap: inherit !important; word-break: inherit !important">---&gt;&nbsp;728f47311940</span><br>Step&nbsp;<span class="hljs-number" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(174, 135, 250, 1); word-wrap: inherit !important; word-break: inherit !important">4</span>/<span class="hljs-number" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(174, 135, 250, 1); word-wrap: inherit !important; word-break: inherit !important">5</span>&nbsp;:&nbsp;ENTRYPOINT&nbsp;[<span class="hljs-string" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(238, 220, 112, 1); word-wrap: inherit !important; word-break: inherit !important">"java"</span>,<span class="hljs-string" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(238, 220, 112, 1); word-wrap: inherit !important; word-break: inherit !important">"-Djava.security.egd=file:/dev/./urandom"</span>,<span class="hljs-string" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(238, 220, 112, 1); word-wrap: inherit !important; word-break: inherit !important">"-jar"</span>,<span class="hljs-string" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(238, 220, 112, 1); word-wrap: inherit !important; word-break: inherit !important">"/app.jar"</span>]<br><br>&nbsp;<span class="hljs-comment" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(128, 128, 128, 1); word-wrap: inherit !important; word-break: inherit !important">---&gt;&nbsp;Running&nbsp;in&nbsp;5e60e14f90b9</span><br>Removing&nbsp;intermediate&nbsp;container&nbsp;<span class="hljs-number" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(174, 135, 250, 1); word-wrap: inherit !important; word-break: inherit !important">5e60</span>e14f90b9<br>&nbsp;<span class="hljs-comment" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(128, 128, 128, 1); word-wrap: inherit !important; word-break: inherit !important">---&gt;&nbsp;fb9135e0b8d3</span><br>Step&nbsp;<span class="hljs-number" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(174, 135, 250, 1); word-wrap: inherit !important; word-break: inherit !important">5</span>/<span class="hljs-number" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(174, 135, 250, 1); word-wrap: inherit !important; word-break: inherit !important">5</span>&nbsp;:&nbsp;EXPOSE&nbsp;<span class="hljs-number" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(174, 135, 250, 1); word-wrap: inherit !important; word-break: inherit !important">8081</span><br><br>&nbsp;<span class="hljs-comment" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(128, 128, 128, 1); word-wrap: inherit !important; word-break: inherit !important">---&gt;&nbsp;Running&nbsp;in&nbsp;b37736b77608</span><br>Removing&nbsp;intermediate&nbsp;container&nbsp;b37736b77608<br>&nbsp;<span class="hljs-comment" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(128, 128, 128, 1); word-wrap: inherit !important; word-break: inherit !important">---&gt;&nbsp;b245fecbacc9</span><br>ProgressMessage{id=null,&nbsp;<span class="hljs-built_in" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(248, 35, 117, 1); word-wrap: inherit !important; word-break: inherit !important">status</span>=null,&nbsp;stream=null,&nbsp;<span class="hljs-built_in" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(248, 35, 117, 1); word-wrap: inherit !important; word-break: inherit !important">error</span>=null,&nbsp;progress=null,&nbsp;progressDetail=null}<br>Successfully&nbsp;built&nbsp;b245fecbacc9<br>Successfully&nbsp;tagged&nbsp;docker-test:latest<br>&nbsp;Built&nbsp;docker-test<br>&nbsp;<span class="hljs-comment" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(128, 128, 128, 1); word-wrap: inherit !important; word-break: inherit !important">------------------------------------------------------------------------</span><br>&nbsp;BUILD&nbsp;SUCCESS<br>&nbsp;<span class="hljs-comment" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(128, 128, 128, 1); word-wrap: inherit !important; word-break: inherit !important">------------------------------------------------------------------------</span><br>&nbsp;Total&nbsp;<span class="hljs-built_in" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(248, 35, 117, 1); word-wrap: inherit !important; word-break: inherit !important">time</span>:&nbsp;&nbsp;<span class="hljs-number" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(174, 135, 250, 1); word-wrap: inherit !important; word-break: inherit !important">3.657</span>&nbsp;s<br>&nbsp;Finished&nbsp;at:&nbsp;<span class="hljs-number" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(174, 135, 250, 1); word-wrap: inherit !important; word-break: inherit !important">2019</span><span class="hljs-number" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(174, 135, 250, 1); word-wrap: inherit !important; word-break: inherit !important">-11</span><span class="hljs-number" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(174, 135, 250, 1); word-wrap: inherit !important; word-break: inherit !important">-19</span>T15:<span class="hljs-number" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(174, 135, 250, 1); word-wrap: inherit !important; word-break: inherit !important">24</span>:<span class="hljs-number" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(174, 135, 250, 1); word-wrap: inherit !important; word-break: inherit !important">50</span>+<span class="hljs-number" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(174, 135, 250, 1); word-wrap: inherit !important; word-break: inherit !important">08</span>:<span class="hljs-number" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(174, 135, 250, 1); word-wrap: inherit !important; word-break: inherit !important">00</span><br>&nbsp;<span class="hljs-comment" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(128, 128, 128, 1); word-wrap: inherit !important; word-break: inherit !important">------------------------------------------------------------------------</span><br>current&nbsp;docker&nbsp;images<br>docker-test&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;latest&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;b245fecbacc9&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Less&nbsp;than&nbsp;a&nbsp;second&nbsp;ago&nbsp;&nbsp;&nbsp;<span class="hljs-number" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(174, 135, 250, 1); word-wrap: inherit !important; word-break: inherit !important">658</span>MB<br>start&nbsp;container<br><span class="hljs-number" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(174, 135, 250, 1); word-wrap: inherit !important; word-break: inherit !important">6</span>a5195061803f56761fbb4289c6a6035fd3f91afd1057d9c8051cb69c7ef4a75<br>current&nbsp;container<br><span class="hljs-number" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(174, 135, 250, 1); word-wrap: inherit !important; word-break: inherit !important">6</span>a5195061803&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;docker-test&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="hljs-string" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(238, 220, 112, 1); word-wrap: inherit !important; word-break: inherit !important">"java&nbsp;-Djava.securit…"</span>&nbsp;&nbsp;&nbsp;<span class="hljs-number" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(174, 135, 250, 1); word-wrap: inherit !important; word-break: inherit !important">1</span>&nbsp;second&nbsp;ago&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Up&nbsp;Less&nbsp;than&nbsp;a&nbsp;second&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="hljs-number" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(174, 135, 250, 1); word-wrap: inherit !important; word-break: inherit !important">0.0</span><span class="hljs-number" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(174, 135, 250, 1); word-wrap: inherit !important; word-break: inherit !important">.0</span><span class="hljs-number" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(174, 135, 250, 1); word-wrap: inherit !important; word-break: inherit !important">.0</span>:<span class="hljs-number" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(174, 135, 250, 1); word-wrap: inherit !important; word-break: inherit !important">8081</span>-&gt;<span class="hljs-number" style="font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: rgba(174, 135, 250, 1); word-wrap: inherit !important; word-break: inherit !important">8081</span>/tcp&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dockertest<br>star&nbsp;service&nbsp;success!<br>Finished:&nbsp;SUCCESS<br></code></pre>
<blockquote style="line-height: inherit; display: block; padding: 15px 15px 15px 1rem; font-size: 0.9em; margin: 1em 0; color: rgba(0, 0, 0, 1); border-left: 5px solid rgba(239, 112, 96, 1); background: rgba(239, 235, 233, 1); overflow: auto; overflow-wrap: normal; word-break: normal">
<p style="font-size: inherit; color: inherit; line-height: inherit; padding: 0; margin: 0">可以结合参考和我的文章选择自己合适的配置路线,与其说是写总结,也是结合自己弟参考文章的补充</p>
</blockquote></div>

</div>
<div id="MySignature" role="contentinfo">
    人生若只如初见,浮沉繁华,慕然回首,不过过眼云烟。
我只在红尘中争渡,即便是一朵浪花,亦奋勇向前。<br><br>
来源:https://www.cnblogs.com/wuhen8866/p/11889891.html
頁: [1]
查看完整版本: Jenkins+docker+git+Gitee 部署SpringBoot项目