centos7 安装 卸载docker
2016-08-05 08:43
573 查看
使用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.
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.
相关文章推荐
- CentOS系统下docker的安装与卸载
- CentOS7上Docker安装与卸载
- centos安装、卸载、升级docker
- 【docker】docker卸载与安装(阿里云CentOS release 6.8 (Final))
- 【docker】docker卸载与安装(阿里云CentOS release 6.8 (Final))
- centos 7安装和卸载docker ce
- Centos系统下docker的安装与卸载
- [Linux]在Centos中yum安装和卸载软件的使用方法
- Centos 软件的安装与卸载
- Centos 软件的安装与卸载
- 在Centos中yum安装和卸载软件的使用方法[转]
- centOS怎样强制卸载PHP以及自定义安装PHP
- 使用yum来安装或卸载CentOS图形界面包 - [linux技术]
- CentOS 5.4 安装和卸载桌面
- CentOS 下 rpm包与 yum 安装与卸载
- CentOS系统下使用YUM来安装或卸载图形化界面
- CentOS 5.5 安装和卸载桌面
- 使用yum来安装或卸载CentOS图形界面包
- 在Centos中yum安装和卸载软件的使用方法