This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
### 思路
以OpenResty做为网关,不使用JAVA系的方法构建网关
原因:
1、OpenResty更快,性能更好
2、OpenResty更灵活,更熟悉
3、网关主要有两个职能是我关心的,一个是路由,另一个是鉴权,
路由无疑Nginx是无敌的,而鉴权我不想依赖于OpenResty,而且使用JAVA来让每个微服务模块
来自行实现,各回各家,各找各妈,不把鉴权任务交给网关。
### 下载地址
https://openresty.org/cn/download.html
### Docker 镜像
https://hub.docker.com/r/openresty/openresty
```shell
docker run -p 80:80 -d openresty/openresty:1.21.4.1-0-alpine
```
我采用的镜像是1.21.4.1-0-alpine,这个版本的底包较小,适合在容器中使用。
需要使用Dockerfile来创建我的网关镜像,采用配置好的nginx.conf拷贝进镜像中,
并修改nginx.conf,使其符合我的需求。