docker/docker — pull request #8390 by MalteJ (2014-10-03 22:06:37+00:00)
Title: Adding docker-cli run param to set MAC address

Follow-up to #8308 and #8371
Fixes #4918

I have implemented a functionality to set the container's mac address explicitly via docker-run CLI.

$ docker run -i -t --mac-address=26:99:7c:50:d8:20 --name=my-container ubuntu bash

$ docker inspect my-container
...
"NetworkSettings": {
"Bridge": "docker0",
"Gateway": "172.17.42.1",
"IPAddress": "172.17.0.2",
"IPPrefixLen": 16,
"MacAddress": "26:99:7c:50:d8:20",
"PortMapping": null,
"Ports": {}
},
...