Skip to content
This repository was archived by the owner on Jun 18, 2022. It is now read-only.

Commit 5065f33

Browse files
YuxingCraig Jellick
Yuxing
authored and
Craig Jellick
committed
Change DNS sequence for windows container
refer to rancher/rancher#10626 Configure 169.254.169.251 as the first dns address in Windows container.
1 parent 740b4b2 commit 5065f33

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/compute/compute_windows.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ func setupComputeResourceFields(hostConfig *container.HostConfig, instance model
9393
var cmdDNS = []string{
9494
"powershell",
9595
"Get-NetAdapter | Foreach { " +
96-
"$a = (Get-DnsClientServerAddress -InterfaceIndex $_.ifIndex -Addressfamily IPv4).ServerAddresses + '169.254.169.251'; " +
96+
"$a =@('169.254.169.251') + (Get-DnsClientServerAddress -InterfaceIndex $_.ifIndex -Addressfamily IPv4).ServerAddresses ; " +
9797
"Set-DnsClientServerAddress -InterfaceIndex $_.ifIndex -ServerAddresses $a }",
9898
}
9999

0 commit comments

Comments
 (0)