centos7 安装 卸载docker


使用yum安装

sudo tee /etc/yum.repos.d/docker.repo <<-'EOF'

[dockerrepo]

name=Docker Repository

baseurl=https://yum.dockerproject.org/repo/main/centos/7/

enabled=1

gpgcheck=1

gpgkey=https://yum.dockerproject.org/gpg

EOF

Install the Docker package.

$ sudo yum install docker-engine

Start the Docker daemon.

$ sudo service docker start



使用脚本安装

sudo yum update

Run the Docker installation script.

$ curl -fsSL https://get.docker.com/ | sh

This script adds the docker.repo repository and installs Docker.

Start the Docker daemon.

$ sudo service docker start



配置文件修改/etc/systemd/system/docker.service.d/docker.conf:

ExecStart=/usr/bin/docker daemon -H fd:// -D -s overlay --insecure-registry docker.16qian.cn -H 10.10.16.194:2375 -H unix:///var/run/docker.sock




卸载

yum list installed | grep docker

yum list installed | grep docker

docker-engine.x86_64   1.7.1-1.el7 @/docker-engine-1.7.1-1.el7.x86_64.rpm

Remove the package.

$ sudo yum -y remove docker-engine.x86_64

This command does not remove images, containers, volumes, or user-created configuration files on your host.

To delete all images, containers, and volumes, run the following command:

$ rm -rf /var/lib/docker

Locate and delete any user-created configuration files.






     本文转自aaron428 51CTO博客,原文链接:http://blog.51cto.com/aaronsa/1834594,如需转载请自行联系原作者
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值