本文以ambarella平台为例子, 其他平台类似可参考。
开启Docker必要的Kernel配置项
Tag: 如果rootfs空间太小,需要先扩容rootfs大小。注意ambarella的固件烧率限制1G大小,需要合理安排rootfs空间。本文不再细说扩容方法,若无法解决,可留言帮助。
1.检查运行环境
在开发板上运行check-config.sh脚本,然后依照提示将MISSING的功能启用。
脚本下载地址:wget https://github.com/moby/moby/blob/master/contrib/check-config.sh
运行命令:
2.配置Linux kernel
Ambarella配置Linux kernel命令
make menuconfig_public_linux,在menuconfig中配置,遇到无法开启的功能,需要检测依赖是否正常。
3.烧录后NG21查看根文件系统空间,运行check-config.sh查看配置修改
rootfs
Check-config,sh
下载安装docker
1. 选择最新版本docke-20.10.9.tgz安装
Docker下载地址:Index of linux/static/stable/aarch64/
2.解压tar -zxf docker-20.10.9.tgz
3.进入docker,将runc拷贝至/usr/bin/目录下
启动docker
1.设置时间
Date -s “202x-xx-xx ss:ss:ss”
2.挂载cgroup
在/etc/fstab文件添加配置信息
Vi /etc/fstab
mount -a
3.启动containerd
./containerd &
运行成功
4.启动docked
./dockerd –storage-driver=vfs –iptables=false
运行成功
Pull测试镜像,在docker中运行hello-world测试镜像
1.pull hello-world镜像
./docker pull hello-world
2.查看已下载镜像
./docker images
3.运行hello-world镜像
./docker run hello-world