Skip to content

Commit

Permalink
Sync interface name with docker-up and nsinsider
Browse files Browse the repository at this point in the history
  • Loading branch information
kylos101 committed Aug 7, 2023
1 parent 7974f5b commit f241c59
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions pkg/compose/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -1169,17 +1169,17 @@ func (s *composeService) resolveOrCreateNetwork(ctx context.Context, n *types.Ne
createOpts.IPAM.Config = append(createOpts.IPAM.Config, config)
}

// override MTU value and set custom MTU one.
// This is required for gitpod.io due to the veth change
// https://github.com/gitpod-io/gitpod/pull/8955
if createOpts.Options == nil {
createOpts.Options = make(map[string]string)
}
// override MTU value and set custom MTU one.
// This is required for gitpod.io due to the veth change
// https://github.com/gitpod-io/gitpod/pull/8955
if createOpts.Options == nil {
createOpts.Options = make(map[string]string)
}

netIface, err := netlink.LinkByName("ceth0")
if err == nil {
createOpts.Options["com.docker.network.driver.mtu"] = fmt.Sprintf("%v", netIface.Attrs().MTU)
}
netIface, err := netlink.LinkByName("eth0")
if err == nil {
createOpts.Options["com.docker.network.driver.mtu"] = fmt.Sprintf("%v", netIface.Attrs().MTU)
}

networkEventName := fmt.Sprintf("Network %s", n.Name)
w := progress.ContextWriter(ctx)
Expand Down

0 comments on commit f241c59

Please sign in to comment.