www.icesr.com
IT运维工程师的摇篮

ubuntu安装Docker

1.ubuntu提供docker稳定版安装:

<code>    <span class="hljs-number">1</span>/<span class="hljs-built_in">sudo</span> apt-get update
    <span class="hljs-number">2</span>/<span class="hljs-built_in">sudo</span> apt-get install docker.io</code>
<code>卸载:
</code>
<code>    sudo apt-<span class="hljs-built_in">get</span> remove <span class="hljs-comment">--purge docker.io</span></code>

2.docker最新版安装:
添加Docker的私有仓库,安装最新版本

<code><span class="hljs-number">1</span>/sudo apt<span class="hljs-attribute">-get</span> adv <span class="hljs-subst">--</span>keyserver hkp:<span class="hljs-comment">//keyserver.ubuntu.com:80</span>
      <span class="hljs-subst">--</span>recv<span class="hljs-attribute">-keys</span> <span class="hljs-number">36</span>A1D7869245C8950F966E92D8576A8BA88D21E9
    <span class="hljs-number">2</span>/sudo sh <span class="hljs-attribute">-c</span> <span class="hljs-string">"echo deb http://get.docker.com/ubuntu docker main &gt; /etc/apt/sources.list.d/docker.list"</span>
    <span class="hljs-number">3</span>/sudo apt<span class="hljs-attribute">-get</span> update
    <span class="hljs-number">4</span>/sudo apt<span class="hljs-attribute">-get</span> install lxc<span class="hljs-attribute">-docker</span></code>

3.启动停止

<code><span class="hljs-number">1</span>/<span class="hljs-built_in">sudo</span> service docker start
<span class="hljs-number">2</span>/<span class="hljs-built_in">sudo</span> service docker stop
<span class="hljs-number">3</span>/<span class="hljs-built_in">sudo</span> service docker restart</code>

4.Docker service 和 Docker Client共用同一个可执行文件
which docker 查找安装后路径

未经允许不得转载:冰点网络 » ubuntu安装Docker

分享到:更多 ()

评论 抢沙发

评论前必须登录!