1.背景
想自己部署一套halo,发现需要docker环境,而且docker现在已经用处广泛,所以在CentOS服务器上安装docker
2.步骤
# Uninstall old versions
sudo yum remove docker \
docker-client \
docker-client-latest \
docker-common \
docker-latest \
docker-latest-logrotate \
docker-logrotate \
docker-engine
# 该目录下不会被remove
rm -rf /var/lib/docker/*
# Install using the rpm repository
# Set up the repository
sudo yum install -y yum-utils
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
# Install Docker Engine
sudo yum install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
sudo systemctl start docker
sudo docker run hello-world
3.引用
Install Docker Engine on CentOS
标签:sudo,ce,yum,Install,docker,latest,安装,CentOS7.7 From: https://www.cnblogs.com/route/p/17410481.html