Installation of Docker
0、Env
Environment :
- CentOS Linux release 7.9.2009 (Core)
- Client: Docker Engine - Community Version: 20.10.5
- Server: Docker Engine - Community Version: 20.10.5
Installation (text-based installer)
1、Download docker-ce.repo
wget -O /etc/yum.repos.d/docker-ce.repo https://download.docker.com/linux/centos/docker-ce.repo
2、Change sources to TUNA
sed -i 's+https://download.docker.com+https://mirror.nju.edu.cn/docker-ce+' /etc/yum.repos.d/docker-ce.repo
3、Installating
yum makecache fast
yum install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
4、Start service
systemctl start docker
5、Verify
docker --version
6、e.g
docker run hello-world
If you’ve seen such this whitch means the docker have succeed run on you system.
7、Some improvements
change source vim /etc/docker/daemon.json
touch it if there was not such file
{ |