Docker upgrade on centos 7
Primer
If you have to delete the old Docker
If there is something on the old Image Docker version, please delete
- Now Docker old version: The specific version prior to 1.13, which is an important change Docker
- All these images will be deleted, or after upgrading the old image will not be deleted
docker stop `docker ps -a -q`
docker rm `docker ps -a -q`
docker rmi -f `docker images -a -q` //这里将会强制删除
Removing the old version of the software information
yum -y remove docker docker-common container-selinux
Setting latest stable version of Docker warehouse
yum-config-manager \
--add-repo \
https://docs.docker.com/v1.13/engine/installation/linux/repo_files/centos/docker.repo
Installation Docker
Yum update source
yum makecache fast
Install the latest docker
yum -y install docker-engine
Or choose the version you want Docker
yum list docker-engine.x86_64 --showduplicates |sort -r
yum -y install docker-engine-<VERSION_STRING>
start up
systemctl start docker
systemctl enable docker
test
docker run hello-world
Uninstall Docker
yum -y remove docker-engine docker-engine-selinux
Mirror, container, volumes, configuration files are not automatically deleted. Need to be deleted manually