0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

WSL2 で Docker Version 表示されて service start で starting しても status 見たらnot running

Posted at

経緯

Windows上にLaravel Sailで開発環境を構築しようとした。

環境

Windows 11 Home
WSL2
Ubuntu 22.04
Docker 24.0.4

エラーログ

/var/logs/docker.log
error="context canceled" module=libcontainerd namespace=plugins.moby
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

解決策

sudo update-alternatives --set iptables /usr/sbin/iptables-legacy
sudo update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy

原因はよくわからん

最初権限回りの問題かと思い、

sudo chmod 666 /var/run/docker.sock

を叩いたがエラー解消されず。

エラーログを見ると

iptables failed:

という記述があった。

(iptableとは、ざっくり言うとUbuntuのファイアフォールらしい)

iptables-legacyを使用するように変更したところ、
無事ビルドされた。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?