Ubuntu 19.10一开始就对raspberry 4b 4G内存版不太友好,各种装不上,最开始的解决办法是将其内存限制到3G才能正常安装系统1,直到前些天Ubuntu官方发文称这个bug已经得到解决2,本人随即使用手边的板子尝试安装,果真一切顺利.但之后的docker又遇到问题,截至文章发布当日,docker未正式发布对Ubuntu 19.10的支持版本,github上的解决方案是使用针对19.04的版本3,但是稳定性就不好说了,先用着吧,反正离20.04不远了.
安装
wget "https://download.docker.com/linux/ubuntu/dists/disco/pool/stable/arm64/containerd.io_1.2.10-3_arm64.deb"
wget "https://download.docker.com/linux/ubuntu/dists/disco/pool/stable/arm64/docker-ce-cli_19.03.3~3-0~ubuntu-disco_arm64.deb"
wget "https://download.docker.com/linux/ubuntu/dists/disco/pool/stable/arm64/docker-ce_19.03.3~3-0~ubuntu-disco_arm64.deb"
sudo dpkg -i "containerd.io_1.2.6-3_arm64.deb"
sudo dpkg -i "docker-ce-cli_19.03.3~3-0~ubuntu-disco_arm64.deb"
sudo dpkg -i "docker-ce_19.03.3~3-0~ubuntu-disco_arm64.deb"
配置权限
>>> cat /etc/group | grep docker # 查找 docker 组,确认其是否存在
>>> groups # 列出自己的用户组,确认自己在不在 docker 组中
# 如果 docker 组不存在,则添加之:
>>> sudo groupadd docker
# 将当前用户添加到 docker 组
>>> sudo gpasswd -a ${USER} docker
# 重启服务
>>> sudo service docker restart
2020-03-09 更新
目前docker已官方支持19.10系统,因而就需要将原来disco版本的docker升级至eoan版本
>>> sudo apt install docker-ce
Reading package lists... Done
Building dependency tree
Reading state information... Done
docker-ce is already the newest version (5:19.03.3~3-0~ubuntu-disco).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
会发现并没有发现有eoan版本的更新
这就需要添加docker稳定版的仓库地址
>>> sudo apt-get install software-properties-common
>>> curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
OK
>>> sudo apt-key fingerprint 0EBFCD88
>>> sudo add-apt-repository \
... "deb [arch=arm64] https://download.docker.com/linux/ubuntu \
... $(lsb_release -cs) \
... stable"
Get:1 https://download.docker.com/linux/ubuntu eoan InRelease [43.0 kB]
Hit:2 http://ports.ubuntu.com/ubuntu-ports eoan InRelease
Hit:3 http://ports.ubuntu.com/ubuntu-ports eoan-updates InRelease
Hit:4 http://ports.ubuntu.com/ubuntu-ports eoan-backports InRelease
Get:5 https://download.docker.com/linux/ubuntu eoan/stable arm64 Packages [2249 B]
Hit:6 http://ports.ubuntu.com/ubuntu-ports eoan-security InRelease
Fetched 45.3 kB in 2s (20.2 kB/s)
Reading package lists... Done
>>> sudo apt update
Hit:1 https://download.docker.com/linux/ubuntu eoan InRelease
Hit:2 http://ports.ubuntu.com/ubuntu-ports eoan InRelease
Hit:3 http://ports.ubuntu.com/ubuntu-ports eoan-updates InRelease
Hit:4 http://ports.ubuntu.com/ubuntu-ports eoan-backports InRelease
Hit:5 http://ports.ubuntu.com/ubuntu-ports eoan-security InRelease
Reading package lists... Done
Building dependency tree
Reading state information... Done
3 packages can be upgraded. Run 'apt list --upgradable' to see them.
2020-05-07 更新
经测试,最新的Ubuntu 20.04同样适用
2021-04-01 更新
raspberry pi os系统下需要将上面的命令换为:
>>> sudo add-apt-repository \
... "deb [arch=armhf] https://download.docker.com/linux/debian \
... $(lsb_release -cs) \
... stable"
否则会出现
Traceback (most recent call last):
File "/usr/bin/add-apt-repository", line 95, in <module>
sp = SoftwareProperties(options=options)
File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 109, in __init__
self.reload_sourceslist()
File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 599, in reload_sourceslist
self.distro.get_sources(self.sourceslist)
File "/usr/lib/python3/dist-packages/aptsources/distro.py", line 93, in get_sources
(self.id, self.codename))
aptsources.distro.NoDistroTemplateException: Error: could not find a distribution template for Raspbian/buster