dockerode icon indicating copy to clipboard operation
dockerode copied to clipboard

Not able to define MAC address on container creation.

Open joern-iwersen opened this issue 4 years ago • 2 comments

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.

joern-iwersen avatar Mar 22 '21 15:03 joern-iwersen

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.

apocas avatar Apr 05 '21 16:04 apocas

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.

stale[bot] avatar Oct 08 '22 02:10 stale[bot]