Skip to content

Commit

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

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

Expand All @@ -197,6 +197,8 @@ func LinkAandB(a, b types.ContainerJSON, nw string) error {

_, err1 := cli.ContainerCreate(context.Background(), a.Config, a.HostConfig, conf, nil, a.Name)

// Make sure A is connected

// Make sure containers can communicate using

if err1 != nil {
Expand Down

0 comments on commit 213dd86

Please sign in to comment.