pmOS 安装 docker 的折腾记录

License: CC BY-NC-SA 4.0

前言

最后还是失败了。

哈哈哈终于成功了!

失败的尝试

docker 启动不起来,手动运行 sudo dockerd 就会报错

failed to start daemon: Error initializing network controller: error creating default "bridge" network: Failed to Setup IP tables: Unable to enable NAT rule:  (iptables failed: iptables --wait -t nat -I POSTROUTING -s 172.17.0.0/16 ! -o docker0 -j MASQUERADE: Warning: Extension MASQUERADE revision 0 not supported, missing kernel module?
iptables v1.8.10 (nf_tables):  RULE_INSERT failed (No such file or directory): rule in chain POSTROUTING
 (exit status 4))

看到了

missing kernel module?

于是怀疑是内核的问题。

(说句闲话:前前后后编译了大概三次内核……)

参考了这篇

先调整内核参数。

(设置镜像源部分省略)

pmbootstrap kconfig edit linux-postmarketos-qcom-msm8998

然后开始编译。我的破手机要编译一个小时才能编译好自己的内核,因此我加上了 -t 3600。如果能在 15 分钟内编译好就不用加这个参数。

pmbootstrap -t 3600 build --force linux-postmarketos-qcom-msm8998

然后还是没启动成功。

成功的尝试

参考这篇,一步到位。

省流:

(以下均为 root 用户运行)

apk add iptables-legacy

# Remove the existing iptables binary
rm /sbin/iptables

# Create a symlink to iptables-legacy
ln -s /sbin/iptables-legacy /sbin/iptables

#Reboot
reboot

然后就能用了。

posted @   383494  阅读(82)  评论(3编辑  收藏  举报
相关博文:
阅读排行:
· 开源Multi-agent AI智能体框架aevatar.ai,欢迎大家贡献代码
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· 没有Manus邀请码?试试免邀请码的MGX或者开源的OpenManus吧
· 园子的第一款AI主题卫衣上架——"HELLO! HOW CAN I ASSIST YOU TODAY
历史上的今天:
2023-07-19 动态 dp 学习笔记
点击右上角即可分享
微信分享提示