树莓派4B 离线安装 Docker

树莓派4B 离线安装 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 root@192.168.0.5:/home/pi/
scp docker-ce-cli_20.10.6~3-0~debian-buster_armhf.deb root@192.168.0.5:/home/pi/
scp docker-ce_20.10.6~3-0~debian-buster_armhf.deb root@192.168.0.5:/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容器内apt更换国内阿里源


下一篇:nDPI的安装和使用