Start Docker container with specific hostname and mac address

I am working on an app whose license depends on the hostname and MAC address. Problem is Docker starts a container, it has a random hostname and MAC address.

Here is a solution:

docker run -h HOSTNAME --lxc-conf="lxc.network.hwaddr=92:20:de:b0:6b:61" ...

https://github.com/docker/docker/issues/243
http://stackoverflow.com/questions/18479242/how-to-set-the-mac-address-for-docker-lxc-containers

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s