module not added after configure with --add-module

551 views Asked by At

I have a dockerfile

FROM ubuntu:latest

RUN apt-get update
RUN apt-get -y install wget

RUN wget 'http://nginx.org/download/nginx-1.21.6.tar.gz'
RUN tar -xzvf nginx-1.21.6.tar.gz

RUN apt-get install -y git
RUN apt-get install -y gcc
RUN apt-get install -y make
RUN apt-get install -y libpcre3 libpcre3-dev zlib1g zlib1g-dev libssl-dev

WORKDIR nginx-1.21.6
RUN apt-get install -y mercurial
RUN hg clone http://hg.nginx.org/njs
RUN git clone https://github.com/openresty/redis2-nginx-module
RUN ./configure --prefix=/etc/nginx --modules-path=/etc/nginx/modules --sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf --add-module=redis2-nginx-module --add-module=njs/nginx
RUN make -j2
RUN make install

WORKDIR ../

COPY /nginx /etc/nginx

EXPOSE 80

ENTRYPOINT ["nginx", "-g", "daemon off;"]

and after container start i am getting the message: "nginx: [emerg] dlopen() "/etc/nginx/modules/ngx_http_js_module.so" failed (/etc/nginx/modules/ngx_http_js_module.so: cannot open shared object file: No such file or directory) in /etc/nginx/nginx.conf:1" and modules-path that i specified in configure is empty (even modules folder did not create)

0

There are 0 answers