mirror of
https://github.com/docker/compose.git
synced 2025-09-23 17:57:49 +02:00
Only override service mac if set on the main network.
Signed-off-by: Florian Apolloner <florian@apolloner.eu>
This commit is contained in:
parent
d474515d45
commit
2ebb475433
@ -416,7 +416,7 @@ func (s *composeService) prepareContainerMACAddress(ctx context.Context, service
|
|||||||
return "", fmt.Errorf("a MAC address is specified for multiple networks (%s), but this feature requires Docker Engine 1.44 or later (currently: %s)", strings.Join(withMacAddress, ", "), version)
|
return "", fmt.Errorf("a MAC address is specified for multiple networks (%s), but this feature requires Docker Engine 1.44 or later (currently: %s)", strings.Join(withMacAddress, ", "), version)
|
||||||
}
|
}
|
||||||
|
|
||||||
if mainNw != nil {
|
if mainNw != nil && mainNw.MacAddress != "" {
|
||||||
macAddress = mainNw.MacAddress
|
macAddress = mainNw.MacAddress
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user