docker-ce fails to start on AlmaLinux/RHEL 10 due to missing xt_addrtype module now that iptables no longer pulls in kernel-modules-extra unconditionally
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 2/5
- 預估耗時
- 1-3 小時
- 新手友好度
- 74/100
- Issue 類型
- 缺陷
- 描述清晰度
- 描述清楚
- 活躍度
- 冷清
- 技術堆疊
- docker, linux
- 領域
- build-system, devops
研究方向
從 rpm/SPECS/docker-ce.spec 開始,檢查如何為列出的 RHEL 系目標選擇套件相依項目。確認目前對 iptables 和核心模組的處理方式,接著查看 RPM spec 的建置或驗證說明。當這些目標明確相依於 kernel-modules-extra,且套件中繼資料通過驗證時,即為完成。
由索引模型根據 Issue 內容生成。
描述
Environment:
- OS: AlmaLinux 10.2
- Docker version: Docker version 29.6.2, build dfc4efb
- iptables: iptables-nft-1.8.11-15.el10_2.x86_64
Description:
dockerd fails to start with:
failed to start daemon: Error initializing network controller: error obtaining controller instance: failed to register "bridge" driver: failed to add jump rules to ipv4 NAT table: failed to append jump rules to nat-PREROUTING: (COMMAND_FAILED: '/usr/sbin/iptables -t nat -A PREROUTING -m addrtype --dst-type LOCAL -j DOCKER' failed: Warning:
Extension addrtype revision 0 not supported, missing kernel module?
Root cause:
The addrtype match requires the xt_addrtype kernel module, provided by the kernel-modules-extra package on RHEL-family distros. Until recently, kernel-modules-extra was pulled in automatically as an unconditional Recommends of iptables-nft, so it was present on any system with Docker installed, even though docker-ce itself never declared it as a dependency.
That changed upstream in iptables 1.8.11-15.el10:
- Thu Jun 18 2026 Phil Sutter [email protected] [1.8.11-15.el10]
- spec: Recommend kernel-modules-extra only if no other
recommendation applies (Phil Sutter) [RHEL-186232]
Resolves: RHEL-186232
Source: https://git.almalinux.org/rpms/iptables/commit/bdfc71a038368010b31ac9ceb282ba4b23323455
With this change, kernel-modules-extra is no longer reliably installed as a side effect of installing iptables-nft. Since docker-ce.spec does not list kernel-modules-extra as a Requires or Recommends itself, fresh installs of Docker on updated RHEL 10 / AlmaLinux 10 / Rocky 10 systems can now fail to start with the error above, depending on the exact iptables package version and what else is installed on the host.
Requested fix:
Add an explicit Requires (or at minimum Recommends) on kernel-modules-extra in rpm/SPECS/docker-ce.spec for RHEL-family targets (rhel-9, rhel-10, centos-9, centos-10), since dockerd's default bridge network setup depends on the addrtype match and can no longer assume it will be pulled in transitively via iptables.
Workaround in the meantime:
dnf install kernel-modules-extra
systemctl restart docker.service
- 主要語言
- Dockerfile
- 星號
- 37
- 分支
- 42
- 平均合併
- 16 小時 53 分鐘
- 30 天內合併 PR
- 30
環境準備
- 提供 Dockerfile 或 Docker Compose 檔案
- 沒有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
docker/packaging 的其他 Issue
-
難度 2/5 1-3 小時 新手友好度 62/100
docker/packaging#586 · 1 則留言 ·
維護者通常 1 天內回覆
-
難度 3/5 1-2 天 新手友好度 65/100
維護者通常 1 天內回覆
-
難度 4/5 3-5 天 新手友好度 48/100
docker/packaging#558 · 1 個 reaction ·
維護者通常 1 天內回覆
-
docker-ce is unable to be installed on UBI 10 container images because iptables-nft is not available未關閉
難度 3/5 1-2 天 新手友好度 52/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 42/100
維護者通常 1 天內回覆
相似的 Issue
-
Pin Python to 3.14 in the era5grib-parallel environment specification可能已有人在做 @atteggiani 今天認領。 未關閉
難度 1/5 1 小時以內 新手友好度 85/100
ACCESS-NRI/containerised-environments-infra#129 ·
維護者通常 2 天內回覆
-
難度 2/5 1-3 小時 新手友好度 78/100
-
難度 2/5 1-3 小時 新手友好度 74/100
-
難度 2/5 1-3 小時 新手友好度 79/100
Feyisara2108/stellargive#1374 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 78/100
stac-utils/pystac#1857 ·
維護者通常 1 天內回覆