树莓派4B raspberrypi离线安装Docker

下载Docker和相关依赖

docker包和相关依赖下载地址

#下载docker相关的最新包
https://download.docker.com/linux/debian/dists/buster/pool/stable/armhf/containerd.io_1.4.4-1_armhf.deb

https://download.docker.com/linux/debian/dists/buster/pool/stable/armhf/docker-ce-cli_20.10.6~3-0~debian-buster_armhf.deb

https://download.docker.com/linux/debian/dists/buster/pool/stable/armhf/docker-ce_20.10.6~3-0~debian-buster_armhf.deb

#上传到树莓派某个目录,如:/home/pi/目录
scp containerd.io_1.4.4-1_armhf.deb [email protected]:/home/pi/
scp docker-ce-cli_20.10.6~3-0~debian-buster_armhf.deb [email protected]:/home/pi/
scp docker-ce_20.10.6~3-0~debian-buster_armhf.deb [email protected]:/home/pi/

#进入/home/pi/目录,安装docker
cd /home/pi/
sudo dpkg -i containerd.io_1.4.4-1_armhf.deb 
sudo dpkg -i docker-ce-cli_20.10.6_3-0_debian-buster_armhf.deb 
sudo dpkg -i docker-ce_20.10.6_3-0_debian-buster_armhf.deb 

#查看docker版本
docker version

#查看docker信息
docker info

配置Docker开机自启动服务

#启动Docker
systemctl start docker

#查看docker启动状态
systemctl status docker

#查看启动中的容器
docker ps

#设置开机自启动
systemctl enable docker.service

#查看docker开机启动状态 enabled:开启, disabled:关闭
systemctl is-enabled docker.service

你可能感兴趣的:(docker,docker,raspberry,pi)