mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
api: Deprecate ContainerConfig.MacAddress
Having a sandbox/container-wide MacAddress field makes little sense since a container can be connected to multiple networks at the same time. This field is an artefact of old times where a container could be connected to a single network only. As we now have a way to specify per-endpoint mac address, this field is now deprecated. Signed-off-by: Albin Kerouanton <albinker@gmail.com> Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
@@ -3311,11 +3311,6 @@ func (s *DockerCLIRunSuite) TestRunContainerNetModeWithDNSMacHosts(c *testing.T)
|
||||
c.Fatalf("run --net=container with --dns should error out")
|
||||
}
|
||||
|
||||
out, _, err = dockerCmdWithError("run", "--mac-address", "92:d0:c6:0a:29:33", "--net=container:parent", "busybox")
|
||||
if err == nil || !strings.Contains(out, runconfig.ErrConflictContainerNetworkAndMac.Error()) {
|
||||
c.Fatalf("run --net=container with --mac-address should error out")
|
||||
}
|
||||
|
||||
out, _, err = dockerCmdWithError("run", "--add-host", "test:192.168.2.109", "--net=container:parent", "busybox")
|
||||
if err == nil || !strings.Contains(out, runconfig.ErrConflictNetworkHosts.Error()) {
|
||||
c.Fatalf("run --net=container with --add-host should error out")
|
||||
|
||||
Reference in New Issue
Block a user