Docker 安装及问题处理

1 确定Linux版本

   uname -r

2  升级系统(添加 APT 镜像源,添加使用 HTTPS 传输的软件包以及 CA 证书。)

  sudo apt-get update

  sudo apt-get install apt-transport-https ca-certificates

3 Add the new GPG key(为了确认所下载软件包的合法性,需要添加 Docker 官方软件源的 GPG 密钥。)

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

4 向 source.list 中添加 Docker 软件源

 echo "deb https://apt.dockerproject.org/repo ubuntutrusty main" | sudo tee /etc/apt/sources.list.d/docker.list  

5 Update the APT package index.

 sudo apt-get update

6 Verify that APT is pulling from the right repository

 apt-cache policy docker-engine

7  Update your package manager

  sudo apt-get update

8 Install the recommended packages.

 sudo apt-get install linux-image-extra-$(uname -r) linux-image-extra-virtual

9 Update your APT package index

 sudo apt-get update

10 Install Docker.

sudo apt-get install docker-engine

 

11 Start the docker daemon

sudo service docker start

12 Verify that docker is installed correctly by running the hello-world image.

sudo docker run hello-world

 

 

参考资料:

https://docs.docker.com/engine/installation/linux/ubuntulinux/#/install-the-latest-version

http://blog.csdn.net/u013415336/article/details/53713520

 

posted on 2017-01-09 08:24  59号大院傻大爷  阅读(161)  评论(0编辑  收藏  举报