Last active
February 21, 2022 08:13
-
-
Save yankay/bdd3ca69fe236d300e4f190540f829e8 to your computer and use it in GitHub Desktop.
快速安装 Docker - Centos
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 适用于 centos、redhat、x86 和 arm版本 | |
export DOCKER_CE_YUM="mirrors.aliyun.com/docker-ce" | |
# 安装 Docker-CE | |
yum install -y yum-utils device-mapper-persistent-data lvm2 | |
yum-config-manager --add-repo https://$DOCKER_CE_YUM/linux/centos/docker-ce.repo | |
sed -i 's+download.docker.com+$DOCKER_CE_YUM+' /etc/yum.repos.d/docker-ce.repo | |
yum -y install docker-ce | |
systemctl enable --now docker |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
curl https://gist.githubusercontent.com/yankay/bdd3ca69fe236d300e4f190540f829e8/raw/cf772481642030ca756301c2402594f6a59a27f9/gistfile1.txt | bash