树莓派4B安装 docker18.09.9

≡放荡痞女 提交于 2020-08-06 02:55:15

硬件:Raspberry Pi 4B(4g或8g版本)
系统:Ubuntu 20.04 LTS

  • 安装docker
(
cat <<EOF
deb [arch=arm64] https://download.docker.com/linux/ubuntu bionic stable
EOF
) > /etc/apt/sources.list.d/docker.list
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
apt update && apt -y install docker-ce=5:18.09.9~3-0~ubuntu-bionic docker-ce-cli=5:18.09.9~3-0~ubuntu-bionic containerd.io
`apt update && apt -y` `install` `docker-ce=5:18.09.9~3-0~ubuntu-bionic docker-ce-cli=5:18.09.9~3-0~ubuntu-bionic containerd.io`
  • docker配置文件
(
cat <<EOF
{
 "registry-mirrors": ["https://ai6ce1da.mirror.aliyuncs.com"],
 "exec-opts": ["native.cgroupdriver=systemd"],
 "storage-driver": "overlay2",
 "storage-opts": [
  "overlay2.override_kernel_check=true"
 ]
}
EOF
) > /etc/docker/daemon.json
  • 配置系统启动参数,禁用ipv6,启用 cgroup
sed -i 's/$/ ipv6.disable=1 cgroup_enable=cpuset cgroup_enable=memory cgroup_memory=1 /g' /boot/firmware/cmdline.txt
  • 重新启动树莓派
reboot
  • 启动后查看docker版本号
Client:
 Version:           18.09.9
 API version:       1.39
 Go version:        go1.11.13
 Git commit:        039a7df
 Built:             Wed Sep  4 16:54:30 2019
 OS/Arch:           linux/arm64
 Experimental:      false

Server: Docker Engine - Community
 Engine:
  Version:          18.09.9
  API version:      1.39 (minimum version 1.12)
  Go version:       go1.11.13
  Git commit:       039a7df
  Built:            Wed Sep  4 16:21:47 2019
  OS/Arch:          linux/arm64
  Experimental:     false

参考

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!