The MAC address is set using the LXC configuration option lxc.network.hwaddr
.
Here is an example of how to set MAC address using Docker 0.6.1:
docker run --lxc-conf="lxc.network.hwaddr=92:20:de:b0:6b:61" my_image ifconfig
In the output, you will see the HWaddr that was set:
eth0 Link encap:Ethernet HWaddr 92:20:de:b0:6b:61
Update:
The previous switch -lxc-conf
(with 1 dash) has been deprecated.
To use the above switch, you docker must be using the LXC driver: -e lxc