openresty / openresty/lua-nginx-module
Unable to run nginx docker image with lua-nginx-module
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 11.8k
- Forks
- 2.1k
- Avg merge
- 6h 1m
- Merged PRs (30d)
- 6
Description
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
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by comparing the nginx:alpine and nginx:1.20.2-alpine base images with the nginx-mod-http-lua package versions, then inspect the module loading lines in nginx.conf. Reproduce the docker build and startup errors; done means the image starts without the version-mismatch or binary-compatibility errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, lua, nginx
- Domain
- backend, devops
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100