Skip to content

Add Support for com.docker.network.container_iface_prefix label #2092

@arkodg

Description

@arkodg

Docker network already has support to change the custom interface container prefix from "eth" to a custom value using the com.docker.network.container_iface_prefix label . This needs to be documented

docker network create -d bridge --opt com.docker.network.container_iface_prefix=moby my-bridge
1f1a42b91423fca8a552e252a1a716cb4d0e29280e5bfc1d408528e73d3e0635
🐳 ~/go-workspace/src/github.com/moby/moby$ docker run -it --network=my-bridge alpine ip link show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: tunl0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN qlen 1000
    link/ipip 0.0.0.0 brd 0.0.0.0
3: ip6tnl0@NONE: <NOARP> mtu 1452 qdisc noop state DOWN qlen 1000
    link/tunnel6 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 brd 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00
775: moby0@if776: <BROADCAST,MULTICAST,UP,LOWER_UP,M-DOWN> mtu 1500 qdisc noqueue state UP 
    link/ether 02:42:ac:18:00:02 brd ff:ff:ff:ff:ff:ff

File: engine/reference/commandline/network_create.md

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions