This repository was archived by the owner on Jun 20, 2024. It is now read-only.
This repository was archived by the owner on Jun 20, 2024. It is now read-only.
Setting MAC address no longer works with recent versions of Docker Compose #2870
Open
Description
For one of my containers I need to specify a certain MAC Address. This seems not possible with Weave:
bergtwvd@app-docker02:~$ docker network create -d weave WWW
304082cb004435b221f8db1f97304eb6545d3806541bf319a4442518f2f5ee97
bergtwvd@app-docker02:~$ docker run --network=WWW --mac-address="00:18:8B:0D:4F:0B" -ti weaveworks/ubuntu
docker: Error response from daemon: failed to create endpoint suspicious_swirles on network WWW: driver modified interface MAC address: endpoint interface MAC address present (00:18:8b:0d:4f:0b). Cannot be modified with a6:7b:00:9a:66:01.; rolled back.
bergtwvd@app-docker02:~$
When I use standard docker overlay, this works fine:
bergtwvd@app-docker02:~$ docker network create -d overlay OOO
61751eeafdc204ccc42e4bfc724b68ed46bf4b75297ae5a19289ff464816a163
bergtwvd@app-docker02:~$ docker run --network=OOO --mac-address="00:18:8B:0D:4F:0B" -ti weaveworks/ubuntu
root@83e934fadf39:/# uname -a
Linux 83e934fadf39 3.13.0-108-generic #155-Ubuntu SMP Wed Jan 11 16:58:52 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
root@83e934fadf39:/#
I recall this worked in the past.