I. Introduction
1, core edition
Currently, Docker running on CentOS 7, the system of claim 64, kernel version 3.10 or more. View this page prerequisite to verify your CentOS version supports Docker.
View your current kernel version uname -r command by
2, the version docker docker-ce into Community Edition and Enterprise Edition dokcer-ee Club, District Edition is freely available to individual developers and small parties, the Enterprise will offer additional fee-based services, such as certified officially tested infrastructure, container, plug-ins, of course docker updated version is faster, closing 2018.12 latest version is 18.09, if the old version of the docker installed on your machine, then you need to uninstall, this article describes how to completely uninstall the old version and install The new version docker.
Second, delete the old version
stop docker service
systemctl stop docker
View the current version
rpm -qa | grep docker
卸载软件包
yum remove docker docker-client docker-client-latest docker-common docker-latest docker-latest-logrotate docker-logrotate docker-selinux docker-engine-selinux docker-engine
===============================
- First check under docker: yum list installed | grep docker ,
and then perform the uninstall command: yum -y remove docker.x86_64 docker-client.x86_64 docker-common.x86_64 - Delete the existing image and the container (in the case may be): rm -rf / var / lib / docker
- Reinstall the Docker: yum -y install Docker
========================================= ===============
Installation system tools necessary
sudo yum install -y yum-utils device -mapper-persistent-data lvm2
Setting domestic yum source
sudo yum-config-manager --add- repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
Delete a profile
Find / etc / systemd -name ' Docker ' -exec RM -f {};
Find / etc / systemd -name ' Docker ' -exec RM -f {};
Find / lib / systemd -name ' Docker ' -exec rm -f {};
before rm -rf / var / lib / docker # delete the existing image and the container, optionally
rm -rf / var / run / docker
Third, install the new version
Package Installation
yum install -y yum-utils device- mapper-persistent-data lvm2
Add source yum
yum-config-Manager
-add the repo-
https://download.docker.com/linux/centos/docker-ce.repo
View installable version of
yum list docker-ce --showduplicates | sort -r
Install the latest version of
yum install docker-ce -y
Up and boot from Kai
systemctl Start Docker
systemctl enable Docker
View version docker
docker version
##############################################
Ordinary users to join the first group docker
sudo gpasswd -a ${USER} docker
Refresh docker group
sudo newgrp docker
重启docker
sudo systemctl daemon-reload
sudo systemctl restart docker
========================
add ordinary users execute permissions
1, a user group creating docker
the sudo the groupadd docker
2, ordinary users to join a user group docker
the sudo the usermod -AG the USER docker $ {}
. 3, restart service docker
the sudo systemctl-daemon reload
the sudo systemctl the restart docker