# Nginx & Lua
![nginx logo](https://github.com/fabiocicerchia/nginx-lua/raw/main/docs/logo-nginx.png)
![lua logo](https://github.com/fabiocicerchia/nginx-lua/raw/main/docs/logo-lua.png)
---
[![MIT License](https://img.shields.io/badge/License-MIT-lightgrey.svg?longCache=true)](LICENSE)
[![Pull Requests](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?longCache=true)](https://github.com/fabiocicerchia/nginx-lua/pulls)
![Last Commit](https://img.shields.io/github/last-commit/fabiocicerchia/nginx-lua)
![Release Date](https://img.shields.io/github/release-date/fabiocicerchia/nginx-lua)
![Docker pulls](https://img.shields.io/docker/pulls/fabiocicerchia/nginx-lua.svg "Docker pulls")
![Docker stars](https://img.shields.io/docker/stars/fabiocicerchia/nginx-lua.svg "Docker stars")
![Known Vulnerabilities](https://img.shields.io/badge/vulnerabilities-snyk-4b45a9)
![Docker](https://github.com/fabiocicerchia/nginx-lua/workflows/Docker/badge.svg)
![Docker Builds](https://github.com/fabiocicerchia/nginx-lua/workflows/Docker%20Builds/badge.svg)
![Auto Update](https://github.com/fabiocicerchia/nginx-lua/workflows/Auto%20Update/badge.svg)
[![Documentation Status](https://readthedocs.org/projects/nginx-lua/badge/?version=latest)](https://nginx-lua.readthedocs.io/en/latest/?badge=latest)
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Ffabiocicerchia%2Fnginx-lua.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Ffabiocicerchia%2Fnginx-lua?ref=badge_shield)
Nginx 1.19+ with Lua support based on Alpine Linux, Amazon Linux, CentOS, Debian, Fedora and Ubuntu.
## Quick reference
- **Maintained by**: [Fabio Cicerchia](https://github.com/fabiocicerchia)
- **Where to get help**: [the Docker Community Forums](https://forums.docker.com/), [the Docker Community Slack](https://dockr.ly/slack), or [Stack Overflow](https://stackoverflow.com/search?tab=newest&q=docker)
## Supported tags and respective `Dockerfile` links
<!-- START_SUPPORTED_TAGS -->
- [`1`,`1.19`,`1.19.7`,`alpine`,`1-alpine`,`1.19-alpine`,`1.19.7-alpine`,`1-alpine3.13.2`,`1-alpine3.13.2`,`1.19-alpine3.13.2`,`1.19.7-alpine3.13.2`,`latest`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.7/alpine/3.13.2/Dockerfile)
- [`amazonlinux`,`1-amazonlinux`,`1.19-amazonlinux`,`1.19.7-amazonlinux`,`1-amazonlinux2.0.20210126.0`,`1-amazonlinux2.0.20210126.0`,`1.19-amazonlinux2.0.20210126.0`,`1.19.7-amazonlinux2.0.20210126.0`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.7/amazonlinux/2.0.20210126.0/Dockerfile)
- [`debian`,`1-debian`,`1.19-debian`,`1-debian10.8`,`1-debian10.8`,`1.19.7-debian`,`1.19-debian10.8`,`1.19.7-debian10.8`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.7/debian/10.8/Dockerfile)
- [`fedora`,`1-fedora`,`1-fedora33`,`1-fedora33`,`1.19-fedora`,`1.19-fedora33`,`1.19.7-fedora`,`1.19.7-fedora33`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.7/fedora/33/Dockerfile)
- [`ubuntu`,`1-ubuntu`,`1.19-ubuntu`,`1-ubuntu20.04`,`1-ubuntu20.04`,`1.19.7-ubuntu`,`1.19-ubuntu20.04`,`1.19.7-ubuntu20.04`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.7/ubuntu/20.04/Dockerfile)
<!-- END_SUPPORTED_TAGS -->
**Note:** The full list of supported/unsupported tags can be found on [`docs/TAGS.md`](https://github.com/fabiocicerchia/nginx-lua/blob/main/docs/TAGS.md).
## Quick reference (cont.)
- **Where to file issues:** [https://github.com/fabiocicerchia/nginx-lua/issues](https://github.com/fabiocicerchia/nginx-lua/issues)
- **Supported architectures:** amd64
- **Published image artifact details:** [repo-info repo's docs/metadata/ directory](https://github.com/fabiocicerchia/nginx-lua/tree/main/docs/examples) ([history](https://github.com/fabiocicerchia/nginx-lua/commits/main/docs/metadata)) (image metadata, transfer size, etc)
## What is nginx?
Nginx (pronounced "engine-x") is an open source reverse proxy server for HTTP, HTTPS, SMTP, POP3, and IMAP protocols, as well as a load balancer, HTTP cache, and a web server (origin server). The nginx project started with a strong focus on high concurrency, high performance and low memory usage. It is licensed under the 2-clause BSD-like license and it runs on Linux, BSD variants, Mac OS X, Solaris, AIX, HP-UX, as well as on other *nix flavors. It also has a proof of concept port for Microsoft Windows.
> [wikipedia.org/wiki/Nginx](https://en.wikipedia.org/wiki/Nginx)
## What is Lua?
Lua is a lightweight, high-level, multi-paradigm programming language designed primarily for embedded use in applications. Lua is cross-platform, since the interpreter of compiled bytecode is written in ANSI C, and Lua has a relatively simple C API to embed it into applications.
> [wikipedia.org/wiki/Lua](https://en.wikipedia.org/wiki/Lua_(programming_language))
## Why this repo and not OpenResty?
| | nginx-lua | OpenResty |
|--|--|--|
| nginx latest version | `1.19.6` | `1.19.x` (last tested: `1.19.3`)* |
| Alpine supported | ✅ | ✅ |
| Amazon supported | ✅ | ✅ |
| CentOS supported | ✅ | ✅ |
| Debian supported | ✅ | ✅ |
| Fedora supported | ✅ | ❌ |
| Ubuntu supported | ✅ | ✅ |
| Windows supported | ❌ | ✅ |
* Note: Between OpenResty compatibility for `1.17.4` (28 Sep 2019) and `1.19.3` (3 Nov 2020) have passed ~10 months, and nginx 1.19.3 has been released on 29 Sep 2020.
## Features
- Support for Lua.
- Minimal size only, minimal layers.
- Same build configure of official nginx image.
- Security checks: Docker Bench Security, Snyk.
- Docker Healthchecks.
- Exposes default ports (`80` and `443`), easy to extend.
- Support for multiple linux distros: Alpine, Amazon, CentOS, Debian, Fedora, Ubuntu.
- Extra Lua Modules.
- Performance Benchmarks.
- LuaRocks Support.
## Typical Uses
> Just to name a few:
>
> - Mashup'ing and processing outputs of various Nginx upstream outputs (proxy, drizzle, postgres, redis, memcached, and etc) in Lua,
> - doing arbitrarily complex access control and security checks in Lua before requests actually reach the upstream backends,
> - manipulating response headers in an arbitrary way (by Lua)
> - fetching backend information from external storage backends (like redis, memcached, mysql, postgresql) and use that information to choose which upstream backend to access on-the-fly,
> - coding up arbitrarily complex web applications in a content handler using synchronous but still non-blocking access to the database backends and other storage,
> - doing very complex URL dispatch in Lua at rewrite phase,
> - using Lua to implement advanced caching mechanism for Nginx's subrequests and arbitrary locations.
>
> The possibilities are unlimited as the module allows bringing together various
> elements within Nginx as well as exposing the power of the Lua language to the
> user. The module provides the full flexibility of scripting while offering
> performance levels comparable with native C language programs both in terms of
> CPU time as well as memory footprint thanks to LuaJIT 2.x.
>
> Other scripting language implementations typically struggle to match this
> performance level.
>
> - <https://github.com/openresty/lua-nginx-module#typical-uses>
## How to use this image
### Hosting some simple static content
```console
$ docker run --name some-nginx -v /some/content:/usr/share/nginx/html:ro -d fabiocicerchia/nginx-lua
[...OMITTED...]
```
Alternatively, a simple `Dockerfile` can be used to generate a new image that includes the necessary content (which is a much cleaner solution than the bind mount above):
```dockerfile
FROM fabiocicerchia/nginx-lua
COPY static-html-directory /usr/share/nginx/html
```
Place this file in the same directory as your directory of content ("static-html-directory"), run `docker build -t some-content-nginx .`, then start your container:
```console
$ docker run --name some-nginx -d some-content-nginx
[...OMITTED...]
```
### Exposing external port
```console
$ docker run --name so
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
Nginx和Lua Nginx 1.19+具有基于Alpine Linux,Amazon Linux,CentOS,Debian,Fedora和Ubuntu的Lua支持。 快速参考 维护: 在哪里寻求帮助: , 或 支持的标签和相应的Dockerfile链接 注意:支持/不支持的标签的完整列表可以在上找到。 快速参考(续) 在哪里提交问题: : 支持的体系结构: amd64 发布的图像工件详细信息: ()(图像元数据,传输大小等) 什么是nginx? Nginx(发音为“ engine-x”)是用于HTTP,HTTPS,SMTP,POP3和IMAP协议的开源反向代理服务器,以及负载平衡器,HTTP缓存和Web服务器(原始服务器)。 Nginx项目一开始就非常关注高并发,高性能和低内存使用。 它获得了两节式BSD许可,并在Linux,BSD变体,Mac OS X,Solari
资源详情
资源评论
资源推荐
收起资源包目录
nginx-lua:Nginx 1.19+,具有基于Alpine Linux,Amazon Linux,CentOS,Debian,Fedora和Ubuntu的LUA支持 (382个子文件)
Dockerfile.alpine 12KB
Dockerfile.amazonlinux 12KB
Dockerfile.centos 12KB
nginx-lua.conf 9KB
nginx.extra.conf 3KB
nginx-non-lua.conf 2KB
Dockerfile.debian 12KB
Dockerfile 19KB
Dockerfile 18KB
Dockerfile 18KB
Dockerfile 18KB
Dockerfile 18KB
Dockerfile 18KB
Dockerfile 18KB
Dockerfile 18KB
Dockerfile 18KB
Dockerfile 18KB
Dockerfile 18KB
Dockerfile 18KB
Dockerfile 18KB
Dockerfile 18KB
Dockerfile 18KB
Dockerfile 18KB
Dockerfile 18KB
Dockerfile 18KB
Dockerfile 18KB
Dockerfile 18KB
Dockerfile 18KB
Dockerfile 18KB
Dockerfile 18KB
Dockerfile 18KB
Dockerfile 18KB
Dockerfile 18KB
Dockerfile 18KB
Dockerfile 17KB
Dockerfile 17KB
Dockerfile 17KB
Dockerfile 17KB
Dockerfile 17KB
Dockerfile 17KB
Dockerfile 17KB
Dockerfile 17KB
Dockerfile 17KB
Dockerfile 17KB
Dockerfile 17KB
Dockerfile 17KB
Dockerfile 17KB
Dockerfile 17KB
Dockerfile 17KB
Dockerfile 17KB
Dockerfile 17KB
Dockerfile 17KB
Dockerfile 12KB
Dockerfile 12KB
Dockerfile 12KB
Dockerfile 12KB
Dockerfile 12KB
Dockerfile 12KB
Dockerfile 12KB
Dockerfile 12KB
Dockerfile 12KB
Dockerfile 12KB
Dockerfile 12KB
Dockerfile 12KB
Dockerfile 12KB
Dockerfile 12KB
Dockerfile 12KB
Dockerfile 11KB
Dockerfile 11KB
Dockerfile 11KB
Dockerfile 11KB
Dockerfile 11KB
Dockerfile 11KB
Dockerfile 11KB
Dockerfile 11KB
Dockerfile 11KB
Dockerfile 11KB
Dockerfile 11KB
Dockerfile 11KB
Dockerfile 11KB
Dockerfile 11KB
Dockerfile 11KB
Dockerfile 11KB
Dockerfile 11KB
Dockerfile 11KB
Dockerfile 11KB
Dockerfile 11KB
Dockerfile 11KB
Dockerfile 11KB
Dockerfile 11KB
Dockerfile 11KB
Dockerfile 11KB
Dockerfile 11KB
Dockerfile 11KB
Dockerfile 11KB
Dockerfile 8KB
Dockerfile 8KB
Dockerfile 8KB
Dockerfile 8KB
Dockerfile 8KB
共 382 条
- 1
- 2
- 3
- 4
梦想是世界和平
- 粉丝: 21
- 资源: 4624
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- MP3设计原理图与PCB
- 双驱双向潜伏式AGV小车3D图纸和工程图机械结构设计图纸和其它技术资料和技术方案非常好100%好用.zip
- 基于java+springboot+mysql+微信小程序的员工日志管理信息系统 源码+数据库+论文(高分毕业设计).zip
- 720n op打印服务器插件三个用
- 双向变距机构3D图纸和工程图机械结构设计图纸和其它技术资料和技术方案非常好100%好用.zip
- HuggingFace tokenizer基本使用及示例展示
- 基于扰动观测器的永磁同步电机(PMSM)模型预测控制(MPC)仿真,速度外环基于模型预测控制、电流内环基于无差拿控制搭建,控制效果理想,模块程序设计通俗易通,送参考文献,方便学习理解
- 计算机二级考试全攻略(含试题)
- AIGC基础知识及应用畅想分享
- 《四维虚拟导管:二尖瓣主动脉疾病主动脉内血流动力学的无创评估》matlab代码.rar
- AM的平方律调制解调方案 matlab代码.rar
- AHRS(航姿算法)的Matlab程序.rar
- DeepRLPID,利用深度强化学习算法对飞机俯仰PID控制器进行自适应调整Matlab代码.rar
- HVAC_RL,暖通空调控制器的强化学习Matlab实现.rar
- AUV MatLab的强化学习QLearning自调谐PID控制器.rar
- matalb求解化工中热量传递的一个实际问题.rar
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0