<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>部署 on Phoenix</title><link>https://chengyujang.github.io/tags/%E9%83%A8%E7%BD%B2/</link><description>Recent content from Phoenix</description><generator>Hugo</generator><language>zh-CN</language><managingEditor>2388468249@qq.com (Phoenix)</managingEditor><webMaster>2388468249@qq.com (Phoenix)</webMaster><copyright>本博客所有文章除特别声明外，均采用 BY-NC-SA 许可协议。转载请注明出处！</copyright><lastBuildDate>Tue, 01 Sep 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://chengyujang.github.io/tags/%E9%83%A8%E7%BD%B2/index.xml" rel="self" type="application/rss+xml"/><item><title>Docker与Git</title><link>https://chengyujang.github.io/post/docker-and-git/</link><pubDate>Tue, 01 Sep 2026 00:00:00 +0000</pubDate><author>2388468249@qq.com (Phoenix)</author><guid>https://chengyujang.github.io/post/docker-and-git/</guid><description>
<![CDATA[<h1>Docker与Git</h1><p>作者：Phoenix（2388468249@qq.com）</p>
        
          <h2 id="git">
<a class="header-anchor" href="#git"></a>
Git
</h2><p><strong>历史记录</strong>**：随时翻看历史记录，复原不正确的修改
<strong>跟踪记录</strong>：跟踪记录项目版本迭代过程，方便旧版本回滚、抽离
<strong>保持文件一致性</strong>：团队并行开发</p>
<h2 id="docker">
<a class="header-anchor" href="#docker"></a>
Docker
</h2><h2 id="git与docker">
<a class="header-anchor" href="#git%e4%b8%8edocker"></a>
Git与Docker
</h2><table>
	<thead>
			<tr>
					<th style="text-align: center">工具</th>
					<th style="text-align: center">描述</th>
					<th style="text-align: center">场景</th>
					<th style="text-align: center">代表平台</th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td style="text-align: center"><strong>Git</strong></td>
					<td style="text-align: center">分布式版本控制工具</td>
					<td style="text-align: center">管<strong>代码</strong>：历史、分支、合并、回滚、多人协作</td>
					<td style="text-align: center">GitHub、GitLab、Gitee</td>
			</tr>
			<tr>
					<td style="text-align: center"><strong>Docker</strong></td>
					<td style="text-align: center">容器化平台</td>
					<td style="text-align: center">管<strong>运行环境</strong>：把应用+依赖打包成镜像，到哪都能跑</td>
					<td style="text-align: center">Docker Hub、GHCR、阿里云 ACR</td>
			</tr>
	</tbody>
</table>
<p><strong>Git</strong>：管代码怎么变,开发时用，防止代码丢了、乱了、多人改冲突。<br>
<strong>Docker</strong>：管应用怎么跑,部署时用，防止“我电脑能跑，你电脑跑不了”。<br>
<strong>二者关系</strong>：写代码 -&gt; Git 提交 -&gt; CI 根据 Dockerfile 构建镜像 -&gt; 推到镜像仓库 -&gt; 服务器拉镜像运行</p>
        
        <hr><p>本文2026-09-01首发于<a href='https://chengyujang.github.io/'>Phoenix</a>，最后修改于2026-09-01</p>]]></description><category>工具</category></item></channel></rss>