How do I install docker in a Linux environment?
Recommended Linux installation:
I. install Docker
#Install dependency packages:
yum install -y yum-utils device-mapper-persistent-data lvm2
#Add docker package source
yum-config-manager\
--add-repo\
http://download.docker.com/linux/centos/docker-ce.repo
#Update yum package index
Yum makecache fast
#Install docker CE
Yum install docker-ce
#Start
Systemctl start docker
#unload
yum remove docker-ce
rm -rf /var/lib/docker
Official installation documentation:
https://docs.docker.com/engine/installation/linux/docker-ce/centos/#docker-ee-customers
Public mirror library: hub.docker.com/explore
II. Configure domestic mirror warehouse
1.vim /etc/docker/daemon.json
{
"registry-mirrors":["https://6kx4zyno.mirror.aliyuncs.com"]
}
2. Restart docker: systemctl restart docker
3. See also: ps -ef| grep docker
4. View images: docker images