Skip to content
This repository was archived by the owner on Jul 18, 2025. It is now read-only.

Commit b94d29f

Browse files
committed
Use Network.RealName instead of Network.Name during network check
Signed-off-by: Anthony Lapenna <[email protected]>
1 parent 0ad950c commit b94d29f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docker/service/service.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ func (s *Service) connectContainerToNetworks(ctx context.Context, c *container.C
357357
}
358358
if s.serviceConfig.Networks != nil {
359359
for _, network := range s.serviceConfig.Networks.Networks {
360-
existingNetwork, ok := connectedNetworks[network.Name]
360+
existingNetwork, ok := connectedNetworks[network.RealName]
361361
if ok {
362362
// FIXME(vdemeester) implement alias checking (to not disconnect/reconnect for nothing)
363363
aliasPresent := false

0 commit comments

Comments
 (0)