Docker macvlan: attach containers to a physical network
Answer: The macvlan driver only works on Linux hosts.
When to use it
Some legacy applications expect to be directly connected to the physical network.
Applications which monitor network traffic can have that same expectation.
You need to designate a physical interface on your Docker host, as well as the subnet and gateway.
You can even isolate your Macvlan networks using different physical network interfaces.
Platform limits
Requires at least Linux kernel version 3.9, and version 4.0 or later is recommended.
Docker Desktop for Mac or Windows, and Docker Engine on Windows, do not support this driver.
Most cloud providers block macvlan networking.
You may need physical access to your networking equipment.
See also
Claims
- id: C1 claim: The macvlan driver only works on Linux hosts. source: S1 evidence: "The macvlan driver only works on Linux hosts."
- id: C2 claim: It is not supported on Docker Desktop for Mac or Windows. source: S1 evidence: "It is not supported on Docker Desktop for Mac or Windows"
- id: C3 claim: You may need physical access to your networking equipment. source: S1 evidence: "You may need physical access to your networking equipment."
- id: C4 claim: Requires at least Linux kernel version 3.9, with 4.0 or later recommended. source: S2 evidence: "Requires at least Linux kernel version 3.9"
Sources
- [S1] Macvlan network driver. Docker, Inc.. https://docs.docker.com/engine/network/drivers/macvlan/ . License: Apache-2.0. Accessed 2026-11-24.
- [S2] Macvlan documentation (source). Docker, Inc.. https://raw.githubusercontent.com/docker/docs/main/content/manuals/engine/network/drivers/macvlan.md . License: Apache-2.0. Accessed 2026-11-24.
License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: Docker, Inc., Macvlan network driver; Docker, Inc., Macvlan documentation (source). Apache-2.0 (https://raw.githubusercontent.com/docker/docs/main/LICENSE). Copyright Docker, Inc. Text was condensed and changed from the originals.
License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: Docker, Inc., Macvlan network driver; Docker, Inc., Macvlan documentation (source). Apache-2.0 (https://raw.githubusercontent.com/docker/docs/main/LICENSE). Copyright Docker, Inc.
Cite this
iinventedlight. 2026. "Docker macvlan: attach containers to a physical network." iinventedlight Library, iil:note:eemz4tbc, version of 2026-11-24. https://iinventedlight.com/library/notes/docker-macvlan/. License: CC-BY-4.0.
@misc{iil_note_eemz4tbc,
author = {{iinventedlight}},
title = {{Docker macvlan: attach containers to a physical network}},
howpublished = {iinventedlight Library},
year = {2026},
date = {2026-11-24},
url = {https://iinventedlight.com/library/notes/docker-macvlan/},
note = {Permanent ID iil:note:eemz4tbc. License: CC-BY-4.0.},
}
Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com. Or Report a correction (no account needed).
Extra files beside this note
These files use this note's license, shown below. Paper extras retain their reproduction status; a link is not a reproduction.
- docker-macvlan.schema.json (schema; CC-BY-4.0)
- docker-macvlan.table.json (table; CC-BY-4.0)
For language models and agents: start at /llms.txt | /agents.md | /.well-known/agent-library.json. This page in Markdown: /library/notes/docker-macvlan.md.