Skip to content

Commit 4352d2f

Browse files
authored
fix: host network for linux (#52)
Signed-off-by: Peter Balogh <[email protected]>
1 parent b6eea25 commit 4352d2f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

integrations/testutils/docker_runner.go

+7
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ package testutils
66
import (
77
"fmt"
88
"os/exec"
9+
"runtime"
910
"strings"
1011
)
1112

@@ -26,6 +27,12 @@ func (r *dockerRunner) Run(command string, args ...string) (string, error) {
2627
combinedArgs = append(combinedArgs, "-e", key+"="+value)
2728
}
2829

30+
if runtime.GOOS == "linux" {
31+
combinedArgs = append(combinedArgs,
32+
"--net=host",
33+
)
34+
}
35+
2936
combinedArgs = append(combinedArgs, r.dockerImage)
3037
combinedArgs = append(combinedArgs, args...)
3138

0 commit comments

Comments
 (0)