docker/docker — pull request #8308 by MalteJ (2014-09-30 11:27:36+00:00)
Title: Set container MAC with run parameter and show link-local IPv6 at inspect

This Pull Request depends on https://github.com/docker/libcontainer/pull/208
Related Issues: https://github.com/docker/docker/issues/4918, https://github.com/docker/docker/issues/4033

I have implemented a functionality to set the container's mac address explicitly.
Further docker inspect will display the MAC address as well as the container's link-local IPv6 address.

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

# my-container$ ifconfig eth0
eth0 Link encap:Ethernet HWaddr 26:99:7c:50:d8:20
inet addr:172.17.0.4 Bcast:0.0.0.0 Mask:255.255.0.0
inet6 addr: fe80::2499:7cff:fe50:d820/64 Scope:Link
UP BROADCAST MTU:1500 Metric:1
RX packets:1 errors:0 dropped:0 overruns:0 frame:0
TX packets:1 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:90 (90.0 B) TX bytes:90 (90.0 B)

# host$ docker inspect my-container
...
"NetworkSettings": {
"Bridge": "docker0",
"Gateway": "172.17.42.1",
"IPAddress": "172.17.0.2",
"IPPrefixLen": 16,
"LinkLocalIPv6Address": "fe80::2499:7cff:fe50:d820",
"LinkLocalIPv6PrefixLen": 64,
"MacAddress": "26:99:7c:50:d8:20",
"PortMapping": null,
"Ports": {}
},
...

I am not sure what is the problem with Travis. It says `mkdir: cannot create directory '/precompiled': Permission denied`. On my machine `make test-unit` and `make test-integration` work fine. I would appreciate your help.

This is one of the first steps of full IPv6 integration in docker.
Currently I have a running IPv6 implementation that I am breaking down into multiple Pull-Requests to simplify review and merging.

I would like to get some feedback.