本文用于记录Ubuntu 17.10下Docker CE的安装。
安装依赖
关于Docker CE版本在Ubuntu下安装有如下限制
64位的OS
需要Ubuntu64bit的OS, 确认方法如下
devops@ubuntu:~$ uname -m
x86_64
devops@ubuntu:~$
版本
支持如下Ubuntu的版本
- Artful 17.10
- Xenial 16.04 (LTS)
- Trusty 14.04 (LTS)
注意:其中Artful 17.10只支持Docker CE17.11 Edge以及以后版本,因为Artful本身也是在2017年10月发行的过渡版本
发行代码的确认方式,比如Artful
devops@ubuntu:~$ lsb_release -cs
artful
devops@ubuntu:~$
硬件
Ubuntu对Docker CE的支持除了需要是64位的OS之外,x86的CPU也是需要的。除了x86之外,还有如下的支持类型
- armhf
- s390x(IBM Z)
- ppc64le (IBM Power)
devops@ubuntu:~$ uname -m
x86_64
devops@ubuntu:~$
安装
apt-get update
使用apt-get update更新源中的软件列表
devops@ubuntu:~$ sudo su
[sudo] password for devops:
root@ubuntu:/home/devops# apt-get update
Hit:1 http://cn.archive.ubuntu.com/ubuntu artful InRelease
Get:2 http://cn.archive.ubuntu.com/ubuntu artful-updates InRelease [78.6 kB]
Hit:3 http://cn.archive.ubuntu.com/ubuntu artful-backports InRelease
Get:4 http://security.ubuntu.com/ubuntu artful-security InRelease [78.6 kB]
Get:5 http://cn.archive.ubuntu.com/ubuntu artful-updates/main i386 Packages [212 kB]
Get:6 http://cn.archive.ubuntu.com/ubuntu artful-updates/main amd64 Packages [216 kB]
Get:7 http://cn.archive.ubuntu.com/ubuntu artful-updates/universe i386 Packages [89.0 kB]
Get:8 http://cn.archive.ubuntu.com/ubuntu artful-updates/universe amd64 Packages [89.9 kB]
Fetched 764 kB in 4s (163 kB/s)
Reading package lists... Done
root@ubuntu:/home/devops#
安装所需的package
命令:apt-get install apt-transport-https ca-certificates curl software-properties-common
执行日志
root@ubuntu:/home/devops# apt-get install apt-transport-https ca-certificates curl software-properties-common
Reading package lists... Done
Building dependency tree
Reading state information... Done
ca-certificates is already the newest version (20170717).
software-properties-common is already the newest version (0.96.24.17).
The following additional packages will be installed:
libcurl3
The following NEW packages will be installed:
apt-transport-https
The following packages will be upgraded:
curl libcurl3
2 upgraded, 1 newly installed, 0 to remove and 53 not upgraded.
Need to get 383 kB of archives.
After this operation, 247 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://cn.archive.ubuntu.com/ubuntu artful-updates/main amd64 apt-transport-https amd64 1.5.1 [34.7 kB]
Get:2 http://cn.archive.ubuntu.com/ubuntu artful-updates/main amd64 curl amd64 7.55.1-1ubuntu2.3 [152 kB]
Get:3 http://cn.archive.ubuntu.com/ubuntu artful-updates/main amd64 libcurl3 amd64 7.55.1-1ubuntu2.3 [196 kB]
Fetched 383 kB in 14s (26