Skip to content

WSL2 Kernel do not support nftables and causing docker failed to start up in Ubuntu 20.10+ #6655

@patrick330602

Description

@patrick330602

Environment

Windows build number: 21327
Your Distribution version: Ubuntu Hirsute Hippo (development branch)
Whether the issue is on WSL 2 and/or WSL 1: WSL2

Steps to reproduce

  1. Installing Ubuntu 20.10 (the best way is Ubuntu on Windows Community Preview)
  2. installing docker from the ubuntu repository (sudo apt install docker.io)
  3. start dockerd;

Expected behavior

dockerd should end up at the state API listen on /var/run/docker.sock

Actual behavior

dockerd throws the following error:

 failed to start daemon: Error initializing network controller: error obtaining controller instance: unable to add return rule in DOCKER-ISOLATION-STAGE-1 chain:  (iptables failed: iptables --wait -A DOCKER-ISOLATION-STAGE-1 -j RETURN: iptables v1.8.7 (nf_tables):  RULE_APPEND failed (No such file or directory): rule in chain DOCKER-ISOLATION-STAGE-1
 (exit status 4))

Some related stuff

related article: https://patrickwu.space/2021/03/09/wsl-solution-to-native-docker-daemon-not-starting/
related bug report: https://bugs.launchpad.net/ubuntu-wsl-integration/+bug/1908539

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions