1. get-docker.sh
百度一下,进入docker官网直接下载该文件,然后执行即可
2. 直接下载repo文件
示例:
wget https://download.docker.com/linux/centos/docker-ce.repo -O /etc/yum.repos.d/docker.sh --no-check
或者
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
然后手动下载相关软件:
yum install -y -q docker-ce docker-ce-cli containerd.io docker-compose-plugin docker-ce-rootless-extras docker-buildx-plugin
3. 直接写死到源里,适用于anolis等不在docker官方源但是又完全兼容rhel/centos等的操作系统:
[docker-ce-stable] name=Docker CE Stable baseurl=https://download.docker.com/linux/centos/8/x86_64/stable enabled=1 gpgcheck=1 gpgkey=https://download.docker.com/linux/centos/gpg
然后下载包
yum install -y -q docker-ce docker-ce-cli containerd.io docker-compose-plugin docker-ce-rootless-extras docker-buildx-plugin
标签:centos,示例,公网,ce,https,linux,download,docker From: https://www.cnblogs.com/santia-god/p/17656694.html