0

I am unable to run docker daemon on my embedded device using a custom Linux distro (Yocto based). The initialization ends with the following error:

failed to start daemon: Error initializing network controller: Error creating default "bridge" network: Failed to program NAT chain: Failed to inject DOCKER in PREROUTING chain: iptables failed: iptables --wait -t nat -A PREROUTING -m addrtype --dst-type LOCAL -j DOCKER: iptables v1.8.3 (legacy): Couldn't load match `addrtype':No such file or directory

Kernel version 5.4.70-2.3.2+g8c73bc6

Docker version 19.03.2-ce, build 6a30dfc

Any ideas on what to try?

Thanks in advance!

2
  • 1
    It says what’s the problem in the error message though? Your (custom?) kernel does not support the required IPTables match types. You can have them either as kernel modules or built-in.
    – Daniel B
    Commented May 19, 2022 at 8:21
  • So to say it again: it's about the kernel configuration options, not about the kernel version. You'll have to recompile the kernel, possibly multiple times until all prerequisites are present. (If I could have found a web page about all prerequisites I would have made an answer instead of this comment.)
    – A.B
    Commented May 19, 2022 at 15:03

1 Answer 1

1

What a coincidence, I've being doing this myself.

There's a script provided by the moby project that can help you figure it out what is missing on your kernel to support docker. You can find it here.

Download the file

wget https://raw.githubusercontent.com/moby/moby/master/contrib/check-config.sh

Make it executable

chmod +x check-config.sh

And run

./check-config.sh

Then you'll have to include what's missing and rebuild your kernel.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .