When attaching a container to a network, the provided MacAddress is always ignored #48192
Labels
area/networking
kind/bug
Bugs are bugs. The cause may or may not be known at triage time so debugging may be needed.
status/0-triage
version/27.0
Description
When using the
/v1.44/networks/{id}/connect
endpoint (https://docs.docker.com/engine/api/v1.44/#tag/Network/operation/NetworkConnect) to connect a container to a network, theMacAddress
field seems to be always ignored. When instead providing the same network configuration on creating a container, theMacAddress
field is used.Reproduce
MacAddress
(in the simplest case, without any other config)This unfortunately cannot be done with the CLI tool since
docker network connect
does not allow to specify the MAC address. (Which might explain why this wasn't noticed before.)Expected behavior
Container uses the specified MAC address in the container.
docker version
Client: Version: 27.0.3 API version: 1.46 Go version: go1.22.4 Git commit: 7d4bcd863a Built: Mon Jul 1 21:15:54 2024 OS/Arch: linux/amd64 Context: default Server: Engine: Version: 27.0.3 API version: 1.46 (minimum version 1.24) Go version: go1.22.4 Git commit: 662f78c0b1 Built: Mon Jul 1 21:15:54 2024 OS/Arch: linux/amd64 Experimental: false containerd: Version: v1.7.19 GitCommit: 2bf793ef6dc9a18e00cb12efb64355c2c9d5eb41.m runc: Version: 1.1.13 GitCommit: docker-init: Version: 0.19.0 GitCommit: de40ad0 (also happens with other versions)
docker info
Additional Info
No response
The text was updated successfully, but these errors were encountered: