debian10安装docker

论坛 期权论坛     
选择匿名的用户   2021-5-30 03:14   244   0
<p>使用root登录</p>
<p>将已安装的软件包更新到最新版本:</p>
<pre class="blockcode"><code>apt update
apt upgrade</code></pre>
<p> </p>
<p><img alt="" class="blockcode" src="https://beijingoptbbs.oss-cn-beijing.aliyuncs.com/cs/5606289-16249a4e60d91d6a6bc72e64c07efa30"></p>
<ol><li>安装通过 HTTPS 添加新存储库所需的依赖项:</li></ol>
<pre class="blockcode"><code class="language-html hljs">apt install apt-transport-https ca-certificates curl software-properties-common gnupg2</code></pre>
<p>使用以下 <a href="https://buzheng.org/linux/curl-command-examples/">curl 命令</a>导入存储库的 GPG 密钥:</p>
<pre class="blockcode"><code class="language-html hljs">root&#64;debiantest1:~# curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add -</code></pre>
<pre class="blockcode"><code class="language-html hljs">OK</code></pre>
<pre class="blockcode"><code class="language-html hljs">root&#64;debiantest1:~# </code></pre>
<p>键入以下内容,将 Docker APT 存储库添加到系统的软件存储库列表中:</p>
<pre class="blockcode"><code class="language-html hljs">root&#64;debiantest1:~# add-apt-repository &#34;deb [arch&#61;amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable&#34;</code></pre>
<pre class="blockcode"><code class="language-html hljs">root&#64;debiantest1:~#</code></pre>
<p> </p>
<p>接下来,使用新添加的repo中的Docker包更新包数据库:</p>
<pre class="blockcode"><code class="language-html hljs">apt update</code></pre>
<p> </p>
<p>确保您要从Docker repo而不是默认的Debian repo安装:</p>
<pre class="blockcode"><code class="language-html hljs">root&#64;debiantest1:~# apt-cache policy docker-ce</code></pre>
<pre class="blockcode"><code class="language-html hljs">docker-ce:</code></pre>
<pre class="blockcode"><code class="language-html hljs">  Installed: (none)</code></pre>
<pre class="blockcode"><code class="language-html hljs">  Candidate: 5:19.03.4~3-0~debian-buster</code></pre>
<pre class="blockcode"><code class="language-html hljs">  Version table:</code></pre>
<pre class="blockcode"><code class="language-html hljs">     5:19.03.4~3-0~debian-buster 500</code></pre>
<pre class="blockcode"><code class="language-html hljs">        500 https://download.docker.com/linux/debian buster/stable amd64 Packages</code></pre>
<pre class="blockcode"><code class="language-html hljs">     5:19.03.3~3-0~debian-buster 500</code></pre>
<pre class="blockcode"><code class="language-html hljs">        500 https://download.docker.com/linux/debian buster/stable amd64 Packages</code></pre>
<pre class="blockcode"><code class="language-html hljs">     5:19.03.2~3-0~debian-buster 500</code></pre>
<pre class="blockcode"><code class="language-html hljs">        500 https://download.docker.com/linux/debian buster/stable amd64 Packages</code></pre>
<pre class="blockcode"><code class="language-html hljs">     5:19.03.1~3-0~debian-buster 500</code></pre>
<pre class="blockcode"><code class="language-html hljs">        500 https://download.docker.com/linux/debian buster/stable amd64 Packages</code></pre>
<pre class="blockcode"><code class="language-html hljs">     5:19.03.0~3-0~debian-buster 500</code></pre>
<pre class="blockcode"><code class="language-html hljs">        500 https://download.docker.com/linux/debian buster/stable amd64 Packages</code></pre>
<pre class="blockcode"><code class="language-html hljs">     5:18.09.9~3-0~debian-buster 500</code></pre>
<pre class="blockcode"><code class="language-html hljs">        500 https://download.docker.com/linux/debian buster/stable amd64 Packages</code></pre>
<pre class="blockcode"><code class="language-html hljs">     5:18.09.8~3-0~debian-buster 500</code></pre>
<pre class="blockcode"><code class="language-html hljs">        500 https://download.docker.com/linux/debian buster/stable amd64 Packages</code></pre>
<pre class="blockcode"><code class="language-html hljs">     5:18.09.7~3-0~debian-buster 500</code></pre>
<pre class="blockcode"><code class="language-html hljs">        500 https://download.docker.com/linux/debian buster/stable amd64 Packages</code></pre>
<pre class="blockcode"><code class="language-html hljs">     5:18.09.6~3-0~debian-buster 500</code></pre>
<pre class="blockcode"><code class="language-html hljs">        500 https://download.docker.com/linux/debian buster/stable amd64 Packages</code></pre>
<pre class="blockcode"><code class="language-html hljs">     5:18.09.5~3-0~debian-buster 500</code></pre>
<pre class="blockcode"><code class="language-html hljs">        500 https://download.docker.com/linux/debian buster/stable amd64 Packages</code></pre>
<pre class="blockcode"><code class="language-html hljs">     5:18.09.4~3-0~debian-buster 500</code></pre>
<pre class="blockcode"><code class="language-html hljs">        500 https://download.docker.com/linux/debian buster/stable amd64 Packages</code></pre>
<pre class="blockcode"><code class="language-html hljs">     5:18.09.3~3-0~debian-buster 500</code></pre>
<pre class="blockcode"><code class="language-html hljs">        500 https://download.docker.com/linux/debian buster/stable amd64 Packages</code></pre>
<pre class="blockcode"><code class="language-html hljs">     5:18.09.2~3-0~debian-buster 500</code></pre>
<pre class="blockcode"><code class="language-html hljs">        500 https://download.docker.com/linux/debian buster/stable amd
分享到 :
0 人收藏
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

积分:3875789
帖子:775174
精华:0
期权论坛 期权论坛
发布
内容

下载期权论坛手机APP