树莓派raspberry-pi-os(32bit)安装docker
下载raspberry-pi-os镜像
下面链接是使用的清华源下载os镜像
wget https://mirrors.tuna.tsinghua.edu.cn/raspberry-pi-os-images/raspios_lite_armhf/images/raspios_lite_armhf-2020-08-24/2020-08-20-raspios-buster-armhf-lite.zip下载完成可以去树莓派官网验证sha256
https://www.raspberrypi.org/downloads/raspberry-pi-os/
本文下载镜像
SHA-256:4522df4a29f9aac4b0166fbfee9f599dab55a997c855702bfe35329c13334668
烧录镜像到SD/TF卡
使用 balenaEtcher 工具,把raspberry-pi-os 烧录到SD/TF卡
启用ssh
读卡器拔出再播放,显示 挂载为目录,进入目录创建 ssh 文件,内容不重要,有这个文件启动系统时就会开启ssh服务
设置时间同步
apt install chrony设置时区
检查时间是否正常
安装配置vim
编辑 /usr/share/vim/vim81/defaults.vim
找到 79 行左右 set mouse=a 改为 set mouse=v
安装docker
设置系统默认源为清华源
编辑 /etc/apt/sources.list 文件,删除原文件所有内容,用以下内容取代:
编辑 /etc/apt/sources.list.d/raspi.list 文件,删除原文件所有内容,用以下内容取代:
信任 Docker 的 GPG 公钥:
设置docker源为清华源
编辑 /boot/cmdline.txt 文件最后添加 cgroup_memory=1 cgroup_enable=memory
修改后内容如下:
编辑 /etc/docker/daemon.json ,添加忽略镜像库证书地址,及默认镜像库
重启主机
参考
https://mirror.tuna.tsinghua.edu.cn/help/raspbian/
https://anto.online/guides/cannot-autolaunch-d-bus-without-x11-display/
Last updated