lua-nginx-module
lua-nginx-module copied to clipboard
Unable to run nginx docker image with lua-nginx-module
I have a simple docker file with lua module:
FROM nginx:alpine
RUN apk add --no-cache nginx-mod-http-lua
COPY config/ /etc/nginx/
and nginx.conf has these three lines:
load_module /usr/lib/nginx/modules/ndk_http_module.so;
load_module /usr/lib/nginx/modules/ngx_http_lua_module.so;
pcre_jit on;
I am getting the version mismatch.
module "/usr/lib/nginx/modules/ndk_http_module.so" version 1020002 instead of 1021006 in /etc/nginx/nginx.conf:1 nginx: [emerg] module "/usr/lib/nginx/modules/ndk_http_module.so" version 1020002 instead of 1021006 in /etc/nginx/nginx.conf:1
I am building a docker as :
docker build --build-arg ENABLED_MODULES="ndk lua" -t nginxapp .
If I try to specify the version:
FROM nginx:1.20.2-alpine
RUN apk update && apk add --no-cache nginx-mod-http-lua=1.20.2-r0
COPY config/ /etc/nginx/
then I get the following:
/docker-entrypoint.sh: Configuration complete; ready for start up 2022/04/01 06:05:46 [emerg] 1#1: 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