首页 > 代码库 > docker学习总结--安装、卸载

docker学习总结--安装、卸载

参考:http://blog.csdn.net/u012562943/article/details/50463400

https://docs.docker.com/engine/getstarted/step_one/#step-3-verify-your-installation

1、环境(宿主机)

$ cat /etc/issue

CentOS release 6.8 (Final)
Kernel \r on an \m

2、yum install docker-io;不是yum install docker

3、更改配置文件
[root@localhost /]# vi /etc/sysconfig/docker
    other-args列更改为:other_args="--exec-driver=lxc --selinux-enabled"

4、启动docker服务
[root@localhost /]# service docker start
Starting cgconfig service:                                 [  OK  ]
Starting docker:                                               [  OK  ]
5、将docker加入开机启动
[root@localhost /]# chkconfig docker on

6、校验是否安装成功

技术分享

7、卸载

1.查询安装过的包

yum list installed | grep docker

docker-io.x86_64                   1.7.1-2.el6                        @epel

2.删除安装的软件包

yum -y remove docker-io.x86_64

3.删除镜像/容器等

rm -rf /var/lib/docker

 

docker学习总结--安装、卸载