Apache APISIX 是一个动态、实时、高性能的云原生 API 网关,提供了负载均衡、动态上游、灰度发布、服务熔断、身份认证、可观测性等丰富的流量管理功能。以下简单介绍Windows下借助Docker Desktop来安装APISIX。
具体应用场景可参考官网(https://apisix.apache.org)说明
微服网关
git clone https://github.com/apache/apisix-docker.git
cd apisix-docker/example
docker-compose -p docker-apisix up -d
登录访问
http://localhost:9000
admin/admin
问题解决
Error response from daemon: Ports are not available: exposing port TCP 0.0.0.0:2379 -> 0.0.0.0:0: listen tcp
0.0.0.0:2379:
bind: An attempt was made to access a socket in a way forbidden by its access permissions.
Error invoking remote method 'docker-start-container': Error: (HTTP code 500) server error - Ports are not available:
exposing port TCP 0.0.0.0:2379 -> 0.0.0.0:0: listen tcp 0.0.0.0:2379:
bind: An attempt was made to access a socket in a way forbidden by its access permissions.
解决方案
1、查看端口占用状态:
netstat -ano|findstr "2379"
未查询到内容,说明该端口未被占用
2、以管理员身份打开PowerShell
2.1) 先停止winnat
net stop winnat
2.2) 再重启winnat
net start winnat
3、再次启动容器成功