{"id":807,"date":"2026-01-08T08:00:02","date_gmt":"2026-01-08T00:00:02","guid":{"rendered":"https:\/\/www.zhoubin.asia\/?p=807"},"modified":"2026-01-07T15:50:50","modified_gmt":"2026-01-07T07:50:50","slug":"docker-2","status":"publish","type":"post","link":"https:\/\/www.zhoubin.asia\/index.php\/2026\/01\/08\/docker-2\/","title":{"rendered":"\u5982\u4f55\u5728 H15H \u4e2d\u4f7f\u7528 Docker"},"content":{"rendered":"<p>\u5728\u5f53\u524d H15 \u5b98\u65b9\u53d1\u5e03\u7684 <strong>1.9.1<\/strong> \u7248\u672c\u4e2d\uff0c\u7cfb\u7edf\u9ed8\u8ba4\u5e76\u672a\u5305\u542b Docker\u3002<br \/>\n\u4e3a\u4e86\u6ee1\u8db3\u5bb9\u5668\u5316\u90e8\u7f72\u7684\u9700\u6c42\uff0c\u6211\u4eec\u5c1d\u8bd5\u901a\u8fc7 Yocto \u7f16\u8bd1\u7684\u65b9\u5f0f\uff0c\u5c06 Docker \u5f15\u5165\u7cfb\u7edf\u5e76\u786e\u4fdd\u5176\u53ef\u4ee5\u6b63\u5e38\u8fd0\u884c\u3002<\/p>\n<h2>\u4e00\u3001\u5f15\u5165 Docker \u6240\u9700\u7684 meta \u5c42<\/h2>\n<p>Docker \u4f9d\u8d56\u4e8e <code>meta-virtualization<\/code>\uff0c\u4f46\u8be5 meta \u5c42\u5728\u9ed8\u8ba4\u7684 Hailo Yocto \u7cfb\u7edf\u4e2d\u5e76\u4e0d\u5b58\u5728\uff0c\u56e0\u6b64\u9700\u8981\u624b\u52a8\u83b7\u53d6\u3002<\/p>\n<pre><code>git clone -b kirkstone https:\/\/git.yoctoproject.org\/meta-virtualization<\/code><\/pre>\n<h2>\u4e8c\u3001\u914d\u7f6e bblayers.conf<\/h2>\n<p>\u5728 <code>build\/conf\/bblayers.conf<\/code> \u4e2d\u52a0\u5165\u521a\u624d clone \u7684\u76ee\u5f55\u3002<br \/>\n\u5f53\u7136\uff0c\u4e5f\u53ef\u4ee5\u50cf\u4e4b\u524d\u4e00\u6837\uff0c\u5c06\u5176\u52a0\u5165\u5230\u5176\u4ed6\u7edf\u4e00\u7ba1\u7406 layer \u7684\u914d\u7f6e\u4f4d\u7f6e\uff0c\u5177\u4f53\u53ef\u53c2\u8003\u6211\u4e4b\u524d<a href=\"https:\/\/www.zhoubin.asia\/index.php\/2025\/06\/11\/hailo-h15-soc\/\"> USB WiFi<\/a> \u4e2d\u7684\u793a\u4f8b\u3002<\/p>\n<pre><code>\/home\/alex\/Work\/H15\/meta-hailo-soc\/meta-virtualization \\<\/code><\/pre>\n<h2>\u4e09\u3001\u5728 local.conf \u4e2d\u542f\u7528 Docker \u76f8\u5173\u7ec4\u4ef6<\/h2>\n<p>\u63a5\u4e0b\u6765\uff0c\u5728 <code>build\/conf\/local.conf<\/code> \u4e2d\u6dfb\u52a0 Docker \u53ca\u5176\u76f8\u5173\u7ec4\u4ef6\u3002<br \/>\n\u8fd9\u91cc\u6211\u9009\u62e9\u4f7f\u7528\u5982\u4e0b\u914d\u7f6e\uff1a<\/p>\n<pre><code>IMAGE_INSTALL:append = \" docker python3-docker-compose containerd-opencontainers python3-pip\"<\/code><\/pre>\n<p>\u540c\u6837\uff0c\u8fd9\u90e8\u5206\u914d\u7f6e\u4e5f\u53ef\u4ee5\u53c2\u8003 USB WiFi \u7684\u505a\u6cd5\uff0c\u6539\u4e3a\u52a0\u5165\u5230\u81ea\u5b9a\u4e49 package \u4e2d\u8fdb\u884c\u7ba1\u7406\u3002<\/p>\n<h2>\u56db\u3001WIC \u7f16\u8bd1\u5931\u8d25\u95ee\u9898\u5206\u6790<\/h2>\n<p>\u5728\u52a0\u5165 Docker \u540e\u8fdb\u884c\u7f16\u8bd1\u65f6\uff0c\u6211\u4eec\u4f1a\u53d1\u73b0 <code>wic<\/code> \u65e0\u6cd5\u6b63\u5e38\u751f\u6210\u955c\u50cf\u3002<br \/>\n\u62a5\u9519\u5982\u4e0b\uff1a<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-808\" src=\"https:\/\/www.zhoubin.asia\/wp-content\/uploads\/2026\/01\/build_error.png\" alt=\"\" width=\"918\" height=\"554\" \/><br \/>\n\u5176\u6839\u672c\u539f\u56e0\u5728\u4e8e\uff1a\u5f15\u5165 Docker \u540e\uff0crootfs \u4f53\u79ef\u663e\u8457\u589e\u5927\uff0c\u5bfc\u81f4 wic \u6253\u5305\u5931\u8d25\u3002<\/p>\n<div class=\"note\"><strong>\u95ee\u9898\u8bf4\u660e\uff1a<\/strong><br \/>\n\u5728 H15 1.9.1 \u7248\u672c\u4e2d\u5b58\u5728\u4e00\u4e2a\u5df2\u77e5 bug\uff0c\u5373\u4f7f\u6211\u4eec\u5728local.conf \u4e2d\u663e\u5f0f\u914d\u7f6e<br \/>\n<code>IMAGE_ROOTFS_SIZE<\/code>\uff0c\u4f8b\u5982\uff1a<\/p>\n<pre><code>IMAGE_ROOTFS_SIZE:forcevariable = \"262144\"<\/code><\/pre>\n<p>\u4e5f\u65e0\u6cd5\u751f\u6548\u3002<\/p>\n<\/div>\n<h2>\u4e94\u3001\u5b9a\u4f4d\u5e76\u4fee\u590d WKS \u914d\u7f6e\u95ee\u9898<\/h2>\n<p>\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u68c0\u67e5\u5f53\u524d\u4f7f\u7528\u7684 WKS \u6587\u4ef6\uff1a<\/p>\n<pre><code>bitbake -e core-image-minimal | grep ^WKS_FILE=<\/code><\/pre>\n<p>\u53ef\u4ee5\u770b\u5230\u5f53\u524d\u4f7f\u7528\u7684 WKS \u6587\u4ef6\u4e3a <code>sd.wks.in<\/code> \u800c\u4e0d\u662f\u6b63\u5e38\u7684 *.wks \u3002<\/p>\n<p>\u56e0\u6b64\uff0c\u6211\u4eec\u9700\u8981\u4fee\u6539<br \/>\n<code>meta-hailo-bsp\/conf\/machine\/include\/hailo1x-base.inc<\/code> \u4e2d\u7684\u914d\u7f6e\uff1a<\/p>\n<pre><code>#WKS_FILE = \"sd.wks.in\"\r\n+WKS_FILE = \"sd.wks\"<\/code><\/pre>\n<p>\u968f\u540e\uff0c\u5728\u539f\u6709\u7684 <code>sd.wks<\/code> \u6587\u4ef6\u4e2d\uff0c\u5c06\u5185\u5bb9\u4fee\u6539\u4e3a\u5982\u4e0b\u5f62\u5f0f\uff1a<\/p>\n<pre><code>part \/boot --source bootimg-partition --ondisk mmcblk0 --fstype=vfat --label boot --active --align 4 <strong>--size=-1<\/strong> --use-uuid\r\npart \/ --source rootfs --ondisk mmcblk --fstype=ext4 --label root --align 4 --use-uuid <strong>--size=-1<\/strong><\/code><\/pre>\n<p>\u5b8c\u6210\u4e0a\u8ff0\u4fee\u6539\u540e\uff0c\u5c31\u6ca1\u6709\u8fd9\u4e2asize\u7684\u9650\u5236\u4e86\uff0c\u5373\u53ef\u987a\u5229\u5c06 Docker \u7f16\u8bd1\u8fdb wic \u955c\u50cf\uff0c\u5e76\u6210\u529f\u5237\u673a\u8fd0\u884c\u3002<\/p>\n<h2>\u516d\u3001\u5927\u9646\u73af\u5883\u4e0b Docker \u955c\u50cf\u52a0\u901f\u914d\u7f6e<\/h2>\n<p>\u5728\u4e2d\u56fd\u5927\u9646\u73af\u5883\u4e0b\u4f7f\u7528 Docker\uff0c\u901a\u5e38\u9700\u8981\u914d\u7f6e\u955c\u50cf\u52a0\u901f\u5668\u3002<br \/>\n\u7f16\u8f91 Docker \u914d\u7f6e\u6587\u4ef6\uff1a<\/p>\n<pre><code>vi \/etc\/docker\/daemon.json<\/code><\/pre>\n<p>\u5199\u5165\u5982\u4e0b\u5185\u5bb9(2026\u5e741\u6708\u6d4b\u8bd5\u53ef\u7528)\uff1a<\/p>\n<pre><code>{\r\n  \"registry-mirrors\": [\r\n    \"https:\/\/docker.xuanyuan.me\",\r\n    \"https:\/\/docker.m.daocloud.io\",\r\n    \"https:\/\/docker.1ms.run\"\r\n  ]\r\n}<\/code><\/pre>\n<p>\u968f\u540e\u91cd\u542f Docker \u670d\u52a1\uff1a<\/p>\n<pre><code>killall dockerd\r\ndockerd &amp;<\/code><\/pre>\n<h2>\u4e03\u3001Docker \u529f\u80fd\u9a8c\u8bc1<\/h2>\n<p>\u6700\u540e\uff0c\u901a\u8fc7\u8fd0\u884c\u5b98\u65b9\u6d4b\u8bd5\u955c\u50cf\u6765\u9a8c\u8bc1 Docker \u662f\u5426\u5de5\u4f5c\u6b63\u5e38\uff1a<\/p>\n<pre><code>docker run --rm hello-world<\/code><\/pre>\n<p>\u82e5\u5bb9\u5668\u80fd\u591f\u6b63\u5e38\u8fd0\u884c\u5e76\u8f93\u51fa\u6b22\u8fce\u4fe1\u606f\uff0c\u5219\u8bf4\u660e Docker \u5df2\u6210\u529f\u5728 H15H \u5e73\u53f0\u4e0a\u90e8\u7f72\u5b8c\u6210\u3002<br \/>\nPS: \u5728\u8fd0\u884cdocker\u4e4b\u524d\u8bf7\u786e\u4fdd\u7f51\u7edc\u6b63\u5e38\u5e76\u4e14\u8bbe\u5907\u7684\u7cfb\u7edf\u65f6\u95f4\u4e0e\u73b0\u5b9e\u65f6\u95f4\u4e00\u81f4\uff1a<\/p>\n<pre>\u8bbe\u7f6e IP \u5730\u5740\uff1a\r\nifconfig wlan0 192.168.0.30 netmask 255.255.255.0 up\r\n\u8bbe\u7f6e\u7f51\u5173\uff1a\r\nroute add default gw 192.168.0.1 wlan0\r\n\u4fee\u6539 DNS\uff1a\r\n# \u7f16\u8f91 \/etc\/resolv.conf\uff0c\u589e\u52a0\u4e00\u884c\uff1a\r\nnameserver 8.8.8.8\r\n\u4fee\u6539\u65f6\u95f4\uff1adate -s \"2026-01-08 08:00:00\"\r\n\u00a0\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u5728\u5f53\u524d H15 \u5b98\u65b9\u53d1\u5e03\u7684 1.9.1 \u7248\u672c\u4e2d\uff0c\u7cfb\u7edf\u9ed8\u8ba4\u5e76\u672a\u5305\u542b Docker\u3002 \u4e3a\u4e86\u6ee1\u8db3\u5bb9\u5668\u5316\u90e8\u7f72\u7684\u9700\u6c42\uff0c\u6211 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-807","post","type-post","status-publish","format-standard","hentry","category-tech"],"_links":{"self":[{"href":"https:\/\/www.zhoubin.asia\/index.php\/wp-json\/wp\/v2\/posts\/807","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.zhoubin.asia\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.zhoubin.asia\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.zhoubin.asia\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.zhoubin.asia\/index.php\/wp-json\/wp\/v2\/comments?post=807"}],"version-history":[{"count":1,"href":"https:\/\/www.zhoubin.asia\/index.php\/wp-json\/wp\/v2\/posts\/807\/revisions"}],"predecessor-version":[{"id":809,"href":"https:\/\/www.zhoubin.asia\/index.php\/wp-json\/wp\/v2\/posts\/807\/revisions\/809"}],"wp:attachment":[{"href":"https:\/\/www.zhoubin.asia\/index.php\/wp-json\/wp\/v2\/media?parent=807"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.zhoubin.asia\/index.php\/wp-json\/wp\/v2\/categories?post=807"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.zhoubin.asia\/index.php\/wp-json\/wp\/v2\/tags?post=807"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}