阿鹏哥聊灯 發表於 2021-8-20 10:40:00

Debian 系统安装 Docker

<h1 id="1设置安装源">1、设置安装源</h1>
<pre><code>apt-get -y install --no-install-recommends apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://apt.dockerproject.org/gpg | apt-key add -
apt-key fingerprint 58118E89F3A912897C070ADBF76221572C52609D
add-apt-repository "deb https://apt.dockerproject.org/repo/ debian-$(lsb_release -cs) main"
apt-get -y update
</code></pre>
<h1 id="2安装最新版">2、安装最新版</h1>
<pre><code>apt-get -y install docker-engine
</code></pre>
<h1 id="3安装指定版本">3、安装指定版本</h1>
<pre><code>apt-cache policy docker-engine
apt-get -y install docker-engine=&lt;VERSION_STRING&gt;
</code></pre>
<p>例如:安装1.12.6版</p>
<pre><code>apt-get -y install docker-engine=1.13.1-0~debian-$(lsb_release -cs)
</code></pre>
<h1 id="4设置不再更新docker">4、设置不再更新docker</h1>
<pre><code>apt-mark hold docker-engine
</code></pre>


</div>
<div id="MySignature" role="contentinfo">
    <div id="AllanboltSignature">
    <div>作者:Varden</div>
    <div>出处:http://www.cnblogs.com/varden/</div>
    <div>本文内容如有雷同,请联系作者!</div>
    <div>本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。</div>
</div><br><br>
来源:https://www.cnblogs.com/varden/p/15165378.html
頁: [1]
查看完整版本: Debian 系统安装 Docker