巴交 發表於 2024-7-3 11:35:00

debian 12 基于清华源安装docker

<p>清华源docker地址:</p>
<pre class="language-bash highlighter-hljs"><code>https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/debian/</code></pre>
<p><span style="font-size: 14px">安装docker之前需要添加 GPG 公钥,主要是用来验证安装文件是否被篡改,先安装工具:curl和gnupg2,两个工具。</span></p>
<pre class="language-bash highlighter-hljs"><code>apt install curl gnupg2</code></pre>
<p><span style="font-size: 14px">下面是清华源GPG地址,下载和添加。</span></p>
<pre class="language-bash highlighter-hljs"><code>curl -fsSL https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/debian/gpg |apt-key add -</code></pre>
<p>配置清华源</p>
<pre class="language-bash highlighter-hljs"><code>nano /etc/apt/sources.list</code></pre>
<p>在尾部添加清华源,bookworm代表debian12。stable代表发布分支,主要有三个:<code>stable</code>(稳定版)、<code>testing</code>(测试版)和 <code>unstable</code>(不稳定版)。</p>
<pre class="language-bash highlighter-hljs"><code>deb https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/debian bookworm stable</code></pre>
<p>更新库,然后安装</p>
<pre class="language-bash highlighter-hljs"><code>apt update
apt install docker-ce</code></pre>
<p>&nbsp;</p><br><br>
来源:https://www.cnblogs.com/netcore3/p/18281305
頁: [1]
查看完整版本: debian 12 基于清华源安装docker