Skip to content

Lua Module support #3087

@omegion

Description

@omegion

Hi,

I am trying to build a new image for the Nginx container to support the Lua Module. However, I could not make it.

What I have tried so far:

FROM ghcr.io/nginx/nginx-gateway-fabric/nginx:1.6.0

USER root

RUN set -eux \
    && apk update \
    && apk add --no-cache nginx-mod-http-lua

COPY nginx/nginx.conf /etc/nginx/nginx.conf

This fail with:

2025/02/03 18:27:06 [emerg] 48#48: module "/usr/lib/nginx/modules/ndk_http_module.so" version 1024000 instead of 1027000 in /etc/nginx/nginx.conf:1
nginx: [emerg] module "/usr/lib/nginx/modules/ndk_http_module.so" version 1024000 instead of 1027000 in /etc/nginx/nginx.conf:1

it seems Lua version of Alpine is different. When I fix the version issue, this time I see the not compatible error:

2025/02/03 18:24:16 [emerg] 43#43: module "/usr/lib/nginx/modules/ndk_http_module.so" is not binary compatible in /etc/nginx/nginx.conf:1
nginx: [emerg] module "/usr/lib/nginx/modules/ndk_http_module.so" is not binary compatible in /etc/nginx/nginx.conf:1

How can we install the Lua module on top of the Nginx image? I know that the image already has the NJS module. But for my use case, I need to use Lua Redis to fetch keys from a Redis server.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    ✅ Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions