搜索
您的当前位置:首页正文

一、docker安装:

来源:二三娱乐
1.卸载旧版本:$ sudo apt-get remove docker docker-engine docker.io

2.更新包索引:$ sudo apt-get update

3.安装包允许apt通过https使用储存库:
$ sudo apt-get install \
    apt-transport-https \
    ca-certificates \
    curl \
    software-properties-common

4.添加Docker的官方的GPG密钥:
curl -fsSL  | sudo apt-key add -

5. 9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88通过搜索指纹的最后8个字符,验证您现在拥有带指纹的密钥 : 
$ sudo apt-key fingerprint 0EBFCD88

6.使用以下命令设置稳定存储库。即使您还想从边缘或测试存储库安装构建,您始终需要稳定的存储 库。要添加边缘或 测试存储库,请在下面的命令中的单词后添加单词或(或两者)
$ sudo add-apt-repository \
   "deb [arch=amd64]  \
   $(lsb_release -cs) \
   stable"

7.更新apt包索引
$ sudo apt-get update

8.安装指定版本
$ sudo apt-get install docker-ce=17.12.1~ce-0~ubuntu

9.测试查看镜像应该全部是空的
$docker ps

10.记得切换成国内镜像,否则下载镜像太慢,我的博客有写地址:

Top