docker 安装
环境
- Rocky Linux 9.4
移除原有的docker
dnf remove docker \
docker-client \
docker-client-latest \
docker-common \
docker-latest \
docker-latest-logrotate \
docker-logrotate \
docker-engine
安装yum-utils
dnf install -y yum-utils
配置安装源
yum-config-manager \
--add-repo \
https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
安装dockers
dnf install docker-ce docker-ce-cli containerd.io docker-compose-plugin
设置开机启动
systemctl enable --now docker
修改源
vi /etc/docker/deamon.json
{
"registry-mirrors": [
"https://do.nark.eu.org",
"https://dc.j8.work",
"https://docker.m.daocloud.io",
"https://dockerproxy.com",
"https://docker.mirrors.ustc.edu.cn",
"https://docker.nju.edu.cn"
]
}
systemctl daemon-reload
systemctl restart docker
本文来自博客园,作者:一个小笨蛋,转载请注明原文链接:https://www.cnblogs.com/paylove/p/18437163