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
posted @ 2024-09-28 11:26  一个小笨蛋  阅读(8)  评论(0编辑  收藏  举报