docker config_error ai_generated true

Error response from daemon: network macvlan is not supported on this platform

ID: docker/network-driver-not-supported-on-windows

Also available as: JSON · Markdown · 中文
90%Fix Rate
87%Confidence
1Evidence
2023-09-12First Seen

Version Compatibility

VersionStatusIntroducedDeprecatedNotes
Docker Desktop 4.25.0 active
Docker Engine 24.0.5 active

Root Cause

Attempting to use a network driver (e.g., macvlan, ipvlan) that is not available on Windows or certain Linux kernel configurations.

generic

中文

尝试使用在 Windows 或某些 Linux 内核配置上不可用的网络驱动程序(例如 macvlan、ipvlan)。

Official Documentation

https://docs.docker.com/network/drivers/macvlan/

Workarounds

  1. 95% success Use bridge network driver instead: 'docker network create --driver bridge mynet' for cross-container communication.
    Use bridge network driver instead: 'docker network create --driver bridge mynet' for cross-container communication.
  2. 80% success On Linux, ensure the kernel module is loaded: 'sudo modprobe macvlan' and check with 'lsmod | grep macvlan'.
    On Linux, ensure the kernel module is loaded: 'sudo modprobe macvlan' and check with 'lsmod | grep macvlan'.

中文步骤

  1. 改用桥接网络驱动程序:'docker network create --driver bridge mynet' 实现跨容器通信。
  2. 在 Linux 上,确保内核模块已加载:'sudo modprobe macvlan' 并使用 'lsmod | grep macvlan' 检查。

Dead Ends

Common approaches that don't work:

  1. 100% fail

    Installing additional Docker plugins does not enable macvlan on Windows; the driver is Linux-only.

  2. 90% fail

    Switching to Docker Desktop WSL 2 backend on Windows may still not support macvlan due to Hyper-V limitations.