翻出吃土多年的 raspberry pi 3,刷个 Raspbian/buster 装个 docker 来耍耍。
问题1,add-apt-repository
不能添加源
aptsources.distro.NoDistroTemplateException:
Error: could not find a distribution template for Raspbian/buster
查看 /usr/share/python-apt/templates/
,没有 Raspbian,所以跳过直接编辑文件。
问题 2,aufs-dkms
安装失败
Setting up aufs-dkms (4.19+20190211-1) ...
Loading new aufs-4.19+20190211 DKMS files...
It is likely that 4.19.97-v7+ belongs to a chroot's host
Building for 4.19.97+, 4.19.97-v7+, 4.19.97-v7l+ and 4.19.97-v8+
Building initial module for 4.19.97+
Error! Bad return status for module build on kernel: 4.19.97+ (armv7l)
Consult /var/lib/dkms/aufs/4.19+20190211/build/make.log for more information.
dpkg: error processing package aufs-dkms (--configure):
installed aufs-dkms package post-installation script subprocess returned error exit status 10
参考 raspberrypi/linux issus,跳过安装 aufs-dkms
。
问题 3,需要手动给用户添加 docker 用户组
docker: Got permission denied while trying to connect to the Docker daemon socket
at unix:///var/run/docker.sock
一般在 deb 安装过程中,不会做这类操作。通过 /var/lib/dpkg/info/docker-ce*
确认。
问题 4,网络经常不好,使用镜像加速器
docker: Error response from daemon: Get https://registry-1.docker.io/v2/library/...:
net/http: request canceled (Client.Timeout exceeded while awaiting headers).
docker: Get https://registry-1.docker.io/v2/library/...:
read tcp 192.168.0.120:36202->54.174.39.59:443:
read: connection reset by peer.