docker安装包下载地址:https://download.docker.com/linux/centos/7/x86_64/stable/Packages/
需要下载一个selinux包:docker-ce-selinux-17.03.2.ce-1.el7.centos.noarch.rpm
和docker包:docker-ce-17.03.2.ce-1.el7.centos.x86_64.rpm
注意版本一定要对应
下载安装包后,拷贝到linx环境
先安装selinux包:rpm -ivh docker-ce-selinux-17.03.2.ce-1.el7.centos.noarch.rpm
然后安装docker包:rpm -ivh docker-ce-17.03.2.ce-1.el7.centos.x86_64.rpm
docker卸载:
Uninstall old versions
Older versions of Docker were called docker
or docker-engine
. If these are installed, uninstall them, along with associated dependencies.
$ sudo yum remove docker
docker-client
docker-client-latest
docker-common
docker-latest
docker-latest-logrotate
docker-logrotate
docker-engine
Uninstall the Docker package:
$ sudo yum remove docker-ce
Images, containers, volumes, or customized configuration files on your host are not automatically removed. To delete all images, containers, and volumes:
$ sudo rm -rf /var/lib/docker