You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[docker-in-docker] Not working on fedora kernel > 6.11.7-300.fc41.x86_64 #1235
Communication fails on any docker command and fails even on clean Fedora installation.
Reacted by Angus Young, Bertrand Cachet, David_, Marek Horáček, filipstyak, Edward Lau, Karl Wikström, Aleksandr Kadykov, KangSol, Dan McKenzie and 3 more
Some information and workaround (debian bookworm docker image)
sudo dockerd --debug
failed to start daemon: Error initializing network controller:
error obtaining controller instance: failed to register "bridge" driver:
failed to create NAT chain DOCKER: iptables failed: iptables -t nat -N DOCKER:
modprobe: FATAL: Module ip_tables not found in directory /lib/modules/6.12.11-200.fc41.x86_64
iptables v1.8.9 (legacy): can't initialize iptables table `nat': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
(exit status 3)
Problem is that your host system do not load ip_tables kernel module.
If lsmod | grep ip_tables is empty you need load ip_tables kernel module.
To load ip_tables kernel module you can run
sudo modprobe ip_tables
Pernament solution that survive reboots ( I am using Fedora silverblue ) /etc/modules-load.d/ip_tables.conf
ip_tables
docker info finally working 🚀
Reacted by etvt, Edward Lau, marcus-behrendt, Aleksandr Kadykov, Brian Matindi, Arpad Gabor and hertznsk
I suspect this might happen if you don't have the ip_tables module loaded, which is required for iptables-legacy to work. Most likely you only have nf_tables module, which should be fine, if you can use iptables-nft.
If I do this inside the container (using ubuntu as base):
However, I can see that docker-in-docker install script first installs iptables package (which for me always provides both iptables-legacy and iptables-nft) and then links iptables command to iptables-legacy if iptables-legacy is present. Which results in iptables-legacy always being used and always failing if you don't have ip_tables module.
I am not fully sure about that, but maybe the installation script should not link to iptables-legacy, but instead keep iptables linked to whatever it is linked by default (which is iptables-nft is my case).
Reacted by Matus Sabo, Shawn Wilsher, Eric Burns, AndhikaWB, Jussi Mononen and Jeff
Activity
v-Kaniska244 commentedon Jan 13, 2025
Hello michalholis ,
Thank you for reporting the issue. I will check and get back on this.
With Regards,
Kaniska
David-337 commentedon Jan 13, 2025
Same issue here on Bluefin which is a distro based on Fedora
HerrNaN commentedon Jan 24, 2025
Any updates on this?
matus-sabo commentedon Feb 9, 2025
Some information and workaround (debian bookworm docker image)
sudo dockerd --debugProblem is that your host system do not load
ip_tableskernel module.If
lsmod | grep ip_tablesis empty you need load ip_tables kernel module.To load
ip_tableskernel module you can runPernament solution that survive reboots ( I am using Fedora silverblue )
/etc/modules-load.d/ip_tables.confdocker infofinally working 🚀spietras commentedon Feb 20, 2025
I suspect this might happen if you don't have the
ip_tablesmodule loaded, which is required foriptables-legacyto work. Most likely you only havenf_tablesmodule, which should be fine, if you can useiptables-nft.If I do this inside the container (using ubuntu as base):
then it doesn't fail.
However, I can see that
docker-in-dockerinstall script first installsiptablespackage (which for me always provides bothiptables-legacyandiptables-nft) and then linksiptablescommand toiptables-legacyifiptables-legacyis present. Which results iniptables-legacyalways being used and always failing if you don't haveip_tablesmodule.features/src/docker-in-docker/install.sh
Lines 218 to 222 in 5c67da0
I am not fully sure about that, but maybe the installation script should not link to
iptables-legacy, but instead keepiptableslinked to whatever it is linked by default (which isiptables-nftis my case).matus-sabo commentedon Feb 24, 2025
Sebastian Pietras (@spietras) Yes you are right load ip_tables kernel module resolve this issue 👍
fix: workaround docker-in-docker issue on newer fedora kernel
fix: workaround docker-in-docker issue on newer fedora kernel (#324)
[docker-in-docker] Use iptables-legacy only if it's working
AndhikaWB commentedon Oct 25, 2025
Based on spietras workaround, I included this in my
postCreateCommandscript:And now Docker will run correctly inside the container.
Workaround for docker-in-docker bug
Workaround for docker-in-docker bug
Workaround for docker-in-docker bug
Workaround for docker-in-docker bug
Add devcontainer (#241)
HerrNaN commentedon Apr 3, 2026
Is this ever going to be addressed?
@Kaniska244 how did your investigation go regarding this?
gza commentedon Apr 5, 2026
Ubuntu 26.04 is impacted.
v-Kaniska244 commentedon Jun 26, 2026
Fixed as part of PR
feat(image): hook framework and container runtime
feat(image): hook framework and container runtime
feat(image): hook framework and container runtime
feat(image): hook framework and container runtime
feat(image): hook framework and container runtime
feat(image): hook framework and container runtime
feat(image): hook framework and container runtime