基于Ubuntu14.04-LTS下安装docker

1、sudo apt-get update --更新系统源

2、sudo apt-get install docker.io

3、将docker库的公钥中加入到本地apt中

sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D

4、将安装源加入到apt源中并更新

14.04中加入以下源:

deb https://apt.dockerproject.org/repo ubuntu-trusty main

更新:

sudo apt-get update

5、安装

sudo apt-get install lxc-docker

请注意!!! 在安装完后请重启终端

6、验证

sudo docker info

出现以下信息证明安装成功

有可能在执行sudo docker search Ubuntu14  检索镜像出现以下错误

FATA[0000] Error response from daemon: Get https://index.docker.io/v1/search?q=ubuntu
dial tcp: lookup index.docker.io: no such host

导致原因是无法访问index.docker.io 我们应设置本地国内代理,执行以下命令:

sudo HTTP_PROXY=http://your.proxy.host:port docker -d

再次执行就正确了

 

posted @ 2016-05-21 09:38  openstack-learn  阅读(480)  评论(0编辑  收藏  举报