File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -40,13 +40,15 @@ function Get-Proxy-Container(){
40
40
41
41
$SelectedImage = $LINUX_IMAGE_SOURCE
42
42
$Initial = " "
43
+ $LinuxContainerArgs = " --add-host=host.docker.internal:host-gateway"
43
44
44
45
# most of the time, running this script on a windows machine will work just fine, as docker defaults to linux containers
45
46
# however, in CI, windows images default to _windows_ containers. We cannot swap them. We can tell if we're in a CI build by
46
47
# checking for the environment variable TF_BUILD.
47
48
if ($IsWindows -and $env: TF_BUILD ){
48
49
$SelectedImage = $WINDOWS_IMAGE_SOURCE
49
50
$Initial = " C:"
51
+ $LinuxContainerArgs = " "
50
52
}
51
53
52
54
if ($Mode -eq " start" ){
@@ -63,8 +65,8 @@ if ($Mode -eq "start"){
63
65
# else we need to create it
64
66
else {
65
67
Write-Host " Attempting creation of Docker host $CONTAINER_NAME "
66
- Write-Host " docker container create -v `" ${root} :${Initial} /etc/testproxy`" -p 5001:5001 -p 5000:5000 --name $CONTAINER_NAME $SelectedImage "
67
- docker container create - v " ${root} :${Initial} /etc/testproxy" - p 5001 :5001 - p 5000 :5000 -- name $CONTAINER_NAME $SelectedImage
68
+ Write-Host " docker container create -v `" ${root} :${Initial} /etc/testproxy`" $LinuxContainerArgs -p 5001:5001 -p 5000:5000 --name $CONTAINER_NAME $SelectedImage "
69
+ docker container create - v " ${root} :${Initial} /etc/testproxy" $LinuxContainerArgs - p 5001 :5001 - p 5000 :5000 -- name $CONTAINER_NAME $SelectedImage
68
70
}
69
71
70
72
Write-Host " Attempting start of Docker host $CONTAINER_NAME "
You can’t perform that action at this time.
0 commit comments