Get the App
SLTechnology News&Howtos  ›  Servers  › 

How do I install docker in a Linux environment?

Shulou Source: shulou.com Published: 2022-06-03 05:38:29 09月21日 Update

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

Tags: Images repositories official documentation indexing software software packages recommendations updates configuration environment Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MariaDB Shulou Technology MySQL Docker vpn