一,基础信息
root@ubuntu14:~# uname -r
4.4.0-31-generic
root@ubuntu14:~# cat /etc/issue
Ubuntu 14.04.5 LTS \n \l
root@ubuntu14:~# cat /etc/os-release
NAME="Ubuntu"
VERSION="14.04.5 LTS, Trusty Tahr"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 14.04.5 LTS"
VERSION_ID="14.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
二、目前版本
root@ubuntu14:~# docker -v
Docker version 1.12.5, build 7392c3b
root@ubuntu14:~# docker info
Containers: 0
Running: 0
Paused: 0
Stopped: 0
Images: 0
Server Version: 1.12.5
Storage Driver: aufs
Root Dir: /var/lib/docker/aufs
Backing Filesystem: extfs
Dirs: 0
Dirperm1 Supported: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: overlay null bridge host
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Security Options: apparmor
Kernel Version: 4.4.0-31-generic
Operating System: Ubuntu 14.04.5 LTS
OSType: linux
Architecture: x86_64
CPUs: 1
Total Memory: 992.7 MiB
Name: ubuntu14
ID: 5UQC:MEUZ:4GES:U46D:UQCR:BLMJ:QKPC:HBIY:Y25V:7EKT:U7Q4:LHTQ
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
WARNING: No swap limit support
Insecure Registries:
127.0.0.0/8
三、修改为overlay2存储驱动
1、查询并安装overlay模块
root@ubuntu14:~# lsmod | grep overlay
root@ubuntu14:~# modprobe overlay
root@ubuntu14:~# lsmod | grep overlay
overlay 49152 0
2、在/etc/default/docker中添加
DOCKER_OPTS="--storage-driver=overlay2"
3、重启docker
root@ubuntu14:~# service docker restart
docker stop/waiting
docker start/running, process 5585
4、查看切换后的信息
root@ubuntu14:~# docker -v
Docker version 1.12.5, build 7392c3b
root@ubuntu14:~# docker info
Containers: 0
Running: 0
Paused: 0
Stopped: 0
Images: 0
Server Version: 1.12.5
Storage Driver: overlay2
Backing Filesystem: extfs
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: host bridge null overlay
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Security Options: apparmor
Kernel Version: 4.4.0-31-generic
Operating System: Ubuntu 14.04.5 LTS
OSType: linux
Architecture: x86_64
CPUs: 1
Total Memory: 992.7 MiB
Name: ubuntu14
ID: 5UQC:MEUZ:4GES:U46D:UQCR:BLMJ:QKPC:HBIY:Y25V:7EKT:U7Q4:LHTQ
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
WARNING: No swap limit support
Insecure Registries:
127.0.0.0/8
root@ubuntu14:~#
参考:
1、配置在线安装源
root@ubuntu14:~# cat /etc/apt/sources.list
deb https://mirrors.ustc.edu.cn/ubuntu/ trusty main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ trusty-updates main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ trusty-backports main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ trusty-security main restricted universe multiverse
deb https://apt.dockerproject.org/repo/ ubuntu-trusty main
root@ubuntu14:~# apt-get update
Ign http://pkg.jenkins.io binary/ InRelease
Get:1 https://mirrors.ustc.edu.cn trusty InRelease
Ign https://mirrors.ustc.edu.cn trusty InRelease
Hit http://pkg.jenkins.io binary/ Release.gpg
Hit https://apt.dockerproject.org ubuntu-trusty InRelease
Hit https://apt.dockerproject.org ubuntu-trusty/main amd64 Packages
Hit http://pkg.jenkins.io binary/ Release
Hit https://apt.dockerproject.org ubuntu-trusty/main i386 Packages
Get:2 https://apt.dockerproject.org ubuntu-trusty/main Translation-en
Hit http://pkg.jenkins.io binary/ Packages
Hit https://mirrors.ustc.edu.cn trusty-backports InRelease
Get:3 https://mirrors.ustc.edu.cn trusty-security InRelease
Hit https://mirrors.ustc.edu.cn trusty Release.gpg
Get:4 https://mirrors.ustc.edu.cn trusty-updates/main amd64 Packages
Ign https://apt.dockerproject.org ubuntu-trusty/main Translation-en
Ign http://pkg.jenkins.io binary/ Translation-en
Get:5 https://mirrors.ustc.edu.cn trusty-updates/restricted amd64 Packages
Get:6 https://mirrors.ustc.edu.cn trusty-updates/universe amd64 Packages
Get:7 https://mirrors.ustc.edu.cn trusty-updates/multiverse amd64 Packages
Get:8 https://mirrors.ustc.edu.cn trusty-updates/main i386 Packages
Get:9 https://mirrors.ustc.edu.cn trusty-updates/restricted i386 Packages
Get:10 https://mirrors.ustc.edu.cn trusty-updates/universe i386 Packages
Get:11 https://mirrors.ustc.edu.cn trusty-updates/multiverse i386 Packages
Get:12 https://mirrors.ustc.edu.cn trusty-updates/main Translation-en
Get:13 https://mirrors.ustc.edu.cn trusty-updates/multiverse Translation-en
Get:14 https://mirrors.ustc.edu.cn trusty-updates/restricted Translation-en
Get:15 https://mirrors.ustc.edu.cn trusty-updates/universe Translation-en
Hit https://mirrors.ustc.edu.cn trusty-backports/main amd64 Packages
Hit https://mirrors.ustc.edu.cn trusty-backports/restricted amd64 Packages
Hit https://mirrors.ustc.edu.cn trusty-backports/universe amd64 Packages
Hit https://mirrors.ustc.edu.cn trusty-backports/multiverse amd64 Packages
Hit https://mirrors.ustc.edu.cn trusty-backports/main i386 Packages
Hit https://mirrors.ustc.edu.cn trusty-backports/restricted i386 Packages
Hit https://mirrors.ustc.edu.cn trusty-backports/universe i386 Packages
Hit https://mirrors.ustc.edu.cn trusty-backports/multiverse i386 Packages
Hit https://mirrors.ustc.edu.cn trusty-backports/main Translation-en
Hit https://mirrors.ustc.edu.cn trusty-backports/multiverse Translation-en
Hit https://mirrors.ustc.edu.cn trusty-backports/restricted Translation-en
Hit https://mirrors.ustc.edu.cn trusty-backports/universe Translation-en
Get:16 https://mirrors.ustc.edu.cn trusty-security/main amd64 Packages
Get:17 https://mirrors.ustc.edu.cn trusty-security/restricted amd64 Packages
Get:18 https://mirrors.ustc.edu.cn trusty-security/universe amd64 Packages
Get:19 https://mirrors.ustc.edu.cn trusty-security/multiverse amd64 Packages
Get:20 https://mirrors.ustc.edu.cn trusty-security/main i386 Packages
Get:21 https://mirrors.ustc.edu.cn trusty-security/restricted i386 Packages
Get:22 https://mirrors.ustc.edu.cn trusty-security/universe i386 Packages
Get:23 https://mirrors.ustc.edu.cn trusty-security/multiverse i386 Packages
Get:24 https://mirrors.ustc.edu.cn trusty-security/main Translation-en
Get:25 https://mirrors.ustc.edu.cn trusty-security/multiverse Translation-en
Get:26 https://mirrors.ustc.edu.cn trusty-security/restricted Translation-en
Get:27 https://mirrors.ustc.edu.cn trusty-security/universe Translation-en
Hit https://mirrors.ustc.edu.cn trusty Release
Hit https://mirrors.ustc.edu.cn trusty/main amd64 Packages
Hit https://mirrors.ustc.edu.cn trusty/restricted amd64 Packages
Hit https://mirrors.ustc.edu.cn trusty/universe amd64 Packages
Hit https://mirrors.ustc.edu.cn trusty/multiverse amd64 Packages
Hit https://mirrors.ustc.edu.cn trusty/main i386 Packages
Hit https://mirrors.ustc.edu.cn trusty/restricted i386 Packages
Hit https://mirrors.ustc.edu.cn trusty/universe i386 Packages
Hit https://mirrors.ustc.edu.cn trusty/multiverse i386 Packages
Hit https://mirrors.ustc.edu.cn trusty/main Translation-en
Hit https://mirrors.ustc.edu.cn trusty/multiverse Translation-en
Hit https://mirrors.ustc.edu.cn trusty/restricted Translation-en
Hit https://mirrors.ustc.edu.cn trusty/universe Translation-en
Fetched 5593 kB in 29s (191 kB/s)
Reading package lists... Done
root@ubuntu14:~#
2、查询可安装的docker版本
apt-cache policy docker-engine
3、卸载
apt-get remove docker-engine
4、安装指定版本
apt-get install -y docker-engine=1.13.0-0*