ubuntu16.04安装docker

教程来自官网:https://docs.docker.com/install/linux/docker-ce/ubuntu/#extra-steps-for-aufs

这个很流行,而且我也喜欢这个概念,我喜欢新鲜的东西(可以说相当的井底之蛙了)。所以尝试安装:

首先是仓库的选择,两种,核心在4之上可以用overlay2,也比较推荐用这个,特别是16.04及以上版本已经默认是包含了overlay2了,如果真不想用,去看这个https://docs.docker.com/storage/storagedriver/aufs-driver/

  • uname -r

可以看版本,我的是16.04,所以版本是:

 

 

安装

官网提供了三种方法,我选择了第一种。对应官网的

Install using the repository

 1 .sudo apt-get update

 

 2. 

$ sudo apt-get install \
    apt-transport-https \
    ca-certificates \
    curl \
    software-properties-common

 

3.

$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
$ sudo apt-key fingerprint 0EBFCD88

 

 

 

4

$ sudo add-apt-repository \
   "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
   $(lsb_release -cs) \
   stable"

我皮了一下,查了lsb_release -cs之后直接带到命令里了。

$ sudo apt-get update

 

 

5. 

$ sudo apt-get install docker-ce

 6.选择安装版本:

$ apt-cache madison docker-ce

这句话列出版本

sudo apt-get install docker-ce=<VERSION>

这句要把version换成你要的版本,你可以看图

7.测试下是否安装好了

posted @ 2018-03-16 11:47  甜豆儿  阅读(162)  评论(0编辑  收藏  举报