use openresty/openresty:alpine
as a base image it has an /etc/nginx/conf.d/ dir
location /lua {
content_by_lua '
ngx.say("hello from lua")
ngx.say("host: ", os.getenv("HOSTNAME"))
';
}
to propagate env vars, add env
directive to the main context of /usr/local/openresty/nginx/conf/nginx.conf
env HOSTNAME;
env PATH;