Skip to content

Commit

Permalink
fix(nw): multiple network on create
Browse files Browse the repository at this point in the history
  • Loading branch information
yyewolf committed Nov 21, 2023
1 parent 4d8b494 commit cfe5c72
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions internal/docker/isolator.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,13 @@ func LinkAandB(a, b types.ContainerJSON, nw string) error {

// Recreate A with same config
nwc := a.NetworkSettings.Networks
var conf = &network.NetworkingConfig{
EndpointsConfig: nwc,
var conf = &network.NetworkingConfig{}
for k, v := range nwc {
conf.EndpointsConfig = map[string]*network.EndpointSettings{
k: {
NetworkID: v.NetworkID,
},
}
}

a.Config.Labels["goisolator.ignore"] = "true"
Expand Down

0 comments on commit cfe5c72

Please sign in to comment.