hasura/openresty本镜像基于Debian系统构建,集成Openresty 1.9版本,并已编译支持Nginx stream模块。Openresty是一个基于Nginx的Web平台,整合了Lua脚本支持,而stream模块则扩展了Nginx处理TCP/UDP流量的能力,适用于构建高性能的流量代理、负载均衡等服务。
bashdocker run -d --name openresty-stream -p 80:80 -p 443:443 -p 1234:1234 openresty-1.9-debian
说明:-p参数可根据实际需要映射TCP/UDP端口,例如映射1234端口用于UDP服务
若需自定义Nginx配置(尤其是stream模块配置),可通过挂载本地配置目录实现:
bashdocker run -d --name openresty-stream \ -v /path/to/nginx.conf:/usr/local/openresty/nginx/conf/nginx.conf \ -v /path/to/conf.d:/usr/local/openresty/nginx/conf/conf.d \ -p 80:80 -p 443:443 \ openresty-1.9-debian
在nginx.conf中添加stream配置段,实现TCP流量转发:
nginxstream { upstream backend { server backend1:1234 weight=5; server backend2:1234; } server { listen 1234; proxy_pass backend; proxy_timeout 300s; proxy_connect_timeout 10s; } }
bashdocker logs -f openresty-stream
bashdocker exec -it openresty-stream /bin/bash




manifest unknown 错误
TLS 证书验证失败
DNS 解析超时
410 错误:版本过低
402 错误:流量耗尽
身份认证失败错误
429 限流错误
凭证保存错误
来自真实用户的反馈,见证轩辕镜像的优质服务