本次操作仅限于 Ubuntu14.04 LTS
查看内核版本:
dpkg -l|grep linux-image linux-image-extra-3.13.0-32-generic 3.13.0-32.57 amd64 Linux kernel extra modules for version 3.13.0 on 64 bit x86 SMP linux-image-extra-3.13.0-83-generic 3.13.0-83.127 amd64 Linux kernel extra modules for version 3.13.0 on 64 bit x86 SMP
包含extra的内核 才是能使用docker的
检查自己的机器内核,并进行替换 reboot
uname -r
安装docker
$ apt-get update $ apt-get install apt-transport-https ca-certificates sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
创建 /etc/apt/sources.list.d/docker.list
添加:
deb https://apt.dockerproject.org/repo ubuntu-trusty main
apt-get update
卸载旧版本docker
apt-get purge lxc-docker apt-cache policy docker-engine apt-get update sudo apt-get install linux-image-extra-$(uname -r) reboot
安装docker
apt-get install docker-engine sudo service docker start
本文出自 “银狐” 博客,请务必保留此出处http://foxhound.blog.51cto.com/1167932/1758503
原文地址:http://foxhound.blog.51cto.com/1167932/1758503