Skip to content
This repository was archived by the owner on Nov 27, 2023. It is now read-only.

Commit fb5d51f

Browse files
author
Ulysses Souza
authored
Merge pull request #1541 from docker/net_bridge
don't set aliasses if no network binding was declared
2 parents 6a24758 + 334e362 commit fb5d51f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

local/compose/create.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -850,6 +850,9 @@ func buildTmpfsOptions(tmpfs *types.ServiceVolumeTmpfs) *mount.TmpfsOptions {
850850
}
851851

852852
func buildDefaultNetworkConfig(s types.ServiceConfig, networkMode container.NetworkMode, containerName string) *network.NetworkingConfig {
853+
if len(s.Networks) == 0 {
854+
return nil
855+
}
853856
config := map[string]*network.EndpointSettings{}
854857
net := string(networkMode)
855858
config[net] = &network.EndpointSettings{

0 commit comments

Comments
 (0)