Not able to define MAC address on container creation.
When I try to connect a network with a container, I am not able to define a IP or MAC address:
var networkObj = docker.getNetwork('network-name');
networkObj.connect(
{
"Container": 'container-id',
"EndpointConfig": {
"IPAddress": "192.168.101.123",
"MacAddress": "aa:bb:ee:dd:ee:ff"
}
},
function(err, data)
{
console.log(err);
console.log(data);
}
);
The network will be attached successfully but in the container the IP and MAC address values are ignored. Is there a bug or am I doing something wrong? The container only has its default docker values.
Everything seems ok from this side. You seem to be respecting https://docs.docker.com/engine/api/v1.41/#operation/NetworkConnect
Not sure whats failing on the docker side.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Open a new issue if needed.