Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@nilsandrey
Last active May 4, 2021 12:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nilsandrey/1c9ca340b9ba33dccd5d10e2724e0687 to your computer and use it in GitHub Desktop.
Save nilsandrey/1c9ca340b9ba33dccd5d10e2724e0687 to your computer and use it in GitHub Desktop.
Workaround for Unable to bind ports: Docker-for-Windows & Hyper-V. https://github.com/docker/for-win/issues/3171
# 1. Disable hyper-v (which will required a couple of restarts)
dism.exe /Online /Disable-Feature:Microsoft-Hyper-V
# 2. When you finish all the required restarts, reserve the port you want so hyper-v doesn't reserve it back
# Notice: Include the port number is failing to you...50051 on sample...
netsh int ipv4 add excludedportrange protocol=tcp startport=50051 numberofports=1
# 3. Re-Enable hyper-V (which will require a couple of restart)
dism.exe /Online /Enable-Feature:Microsoft-Hyper-V /All
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment