only check privileged ports for WSL

pull/12952/head
Steven Powell 2021-11-15 11:49:59 -05:00
parent b124bf5885
commit 81aedea0bd
1 changed files with 1 additions and 1 deletions

View File

@ -1226,7 +1226,7 @@ func validatePorts(ports []string) error {
if p > 65535 || p < 1 {
return errors.Errorf("Sorry, one of the ports provided with --ports flag is outside range %s", ports)
}
if p < 1024 && i == 0 {
if detect.IsMicrosoftWSL() && p < 1024 && i == 0 {
return errors.Errorf("Sorry, you cannot use privileged ports on the host (below 1024) %s", ports)
}
}