Docker暴露端口无权限

docker: Error response from daemon: Ports are not available: listen tcp 0.0.0.0:4449: bind: An attempt was made to access a socket in a way forbidden by its access permissions.

https://github.com/docker/for-win/issues/3171#issuecomment-554587817

nodejs暴露端口无权限

Error: listen EACCES: permission denied 0.0.0.0:3000

解决办法

cmd中执行如下代码

1
2
netsh int ipv4 set dynamic tcp start=49152 num=16384
netsh int ipv6 set dynamic tcp start=49152 num=16384