使用官方脚本安装
curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun
curl -fsSL https://res.frytea.com/d/Dev/Docker/get_docker.sh | bash -s docker --mirror Aliyun
curl -fsSL https://res.frytea.com/d/Dev/Docker/get_docker.sh | DOWNLOAD_URL=http://192.168.25.10/docker bash -s docker
# ustc
curl -fsSL https://get.docker.com -o get-docker.sh
sudo DOWNLOAD_URL=https://mirrors.ustc.edu.cn/docker-ce sh get-docker.sh
# 也可以自己在内网做一个镜像,将脚本和 docker 软件源全部镜像,可以实现全内网高速安装
curl -fsSL http://192.168.25.9/raw/general/docker/install-docker.sh -o get-docker.sh
sudo DOWNLOAD_URL=http://192.168.25.10/docker sh get-docker.sh
curl -fsSL http://192.168.25.9/raw/general/docker/install-docker.sh | DOWNLOAD_URL=http://192.168.25.10/docker bash -s
安装完成后使能 docker 服务:
systemctl enable docker
syste sart docker
sudo usermod -aG docker $USER
参考文献
- [[Docker CE 镜像源站|https://developer.aliyun.com/article/110806]]