1.下载3个docker离线安装包,下载网址:
https://download.docker.com/linux/ubuntu/dists/xenial/pool/stable/amd64/
2.把3个离线安装包拷贝到ubuntu本地执行以下命令
sudo dpkg -i containerd.io_1.4.6-1_amd64.deb
sudo dpkg -i docker-ce-cli_20.10.7~3-0~ubuntu-xenial_amd64.deb
sudo dpkg -i docker-ce_20.10.7~3-0~ubuntu-xenial_amd64.deb
3.启动doakcer
sudo systemctl start docker
4.查看docker状态
sudo systemctl status docker
5.设置Docker的开机自启动
sudo systemctl enable docker.service
6.查看开机自启动是否添加成功
sudo systemctl list-unit-files |grep docker