Full Blog TOC

Full Blog Table Of Content with Keywords Available HERE

Wednesday, June 2, 2021

Create a LUA enabled NGINX docker image



 

In this post we will review the steps to create a LUA enabled docker image.


NGINX LUA, is a JIT based scripting enable a highly customizable behavior.


The standard docker image is simply:


Dockerfile:

FROM openresty/openresty:1.19.3.1-8-centos7



On the nginx.conf, as part of the main context, we will need to enable LUA JIT:



pcre_jit on;



and as part of the http context of the nginx.conf, we will need to add the folder where our LUA scripts reside:



http {
lua_package_path '/usr/local/lib/lua/?.lua;/my-lua/?.lua;;';



Now, the NGINX is ready for LUA scripting.


To see an example of LUA scripts, check the next post: using NGINX LUA for customized auth requests.


No comments:

Post a Comment