nyarime 发表于 2024-10-3 18:11:41

记录下国内机安装Docker的全流程

Docker 官方一键安装脚本,从阿里源安装
curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun
设置开机自启
systemctl enable docker
启动Docker
systemctl start docker
一键安装最新版 Docker Compose:
curl -L https://get.daocloud.io/docker/compose/releases/download/v2.4.1/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
配置镜像源
mkdir -p /etc/docker
tee /etc/docker/daemon.json <<-'EOF'
{
"registry-mirrors": [
    "https://docker.naixi.net",
    "https://docker-2.naixi.net"
]
}
EOF
重启服务
systemctl daemon-reload
systemctl restart docker
查看是否生效
docker info

skynee 发表于 2024-10-4 09:06:30

感謝大佬,,, 頂一下...{:5_150:}
页: [1]
查看完整版本: 记录下国内机安装Docker的全流程