Skip to content

Commit 6be28d4

Browse files
committed
fix: make sure server won't attach wireport-net to the gateway container
1 parent e48a04a commit 6be28d4

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

app/internal/dockerutils/service.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package dockerutils
22

33
import (
44
"context"
5+
"fmt"
56
"os"
67
"strings"
78
"wireport/cmd/server/config"
@@ -156,6 +157,13 @@ func EnsureDockerNetworkIsAttachedToAllContainers() error {
156157
}
157158

158159
for _, container := range containers {
160+
// Skip wireport-gateway container (should not be connected to the network)
161+
for _, name := range container.Names {
162+
if name == fmt.Sprintf("/%s", config.Config.WireportGatewayContainerName) {
163+
continue
164+
}
165+
}
166+
159167
// Skip containers that are already connected to the target network to avoid conflicts
160168
if container.NetworkSettings != nil {
161169
if _, ok := container.NetworkSettings.Networks[config.Config.DockerNetworkName]; ok {

0 commit comments

Comments
 (0)