Skip to content

Commit d664fcc

Browse files
committed
Update LUA new-tag
1 parent e8e743c commit d664fcc

File tree

1 file changed

+13
-20
lines changed

1 file changed

+13
-20
lines changed

build/Dockerfile.luam

Lines changed: 13 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,35 @@
11
FROM nginx:1.27.4 as lua-builder
22

33
RUN apt-get update && apt-get install -y \
4-
build-essential \
5-
zlib1g-dev \
6-
libssl-dev \
7-
git \
8-
wget \
9-
ca-certificates
4+
build-essential zlib1g-dev libssl-dev git wget ca-certificates libreadline-dev \
5+
libpcre2-dev \
6+
&& rm -rf /var/lib/apt/lists/*
107

118
WORKDIR /usr/src
129

13-
RUN wget https://github.com/PhilipHazel/pcre2/releases/download/pcre2-10.42/pcre2-10.42.tar.gz && \
14-
tar zxvf pcre2-10.42.tar.gz && \
15-
cd pcre2-10.42 && \
16-
./configure --prefix=/usr/local --enable-jit && \
17-
make && make install
18-
19-
RUN git clone https://github.com/openresty/luajit2.git --branch v2.1-agentzh --single-branch
10+
RUN git clone --branch v2.1-agentzh --single-branch https://github.com/openresty/luajit2.git
2011
WORKDIR /usr/src/luajit2
21-
RUN make && make install
12+
RUN make -j"$(nproc)" && make install
2213

2314
ENV PATH="/usr/local/bin:${PATH}"
2415
ENV LD_LIBRARY_PATH="/usr/local/lib:${LD_LIBRARY_PATH}"
2516

2617
WORKDIR /usr/src
27-
28-
RUN git clone --branch v0.3.2 https://github.com/simpl/ngx_devel_kit.git
18+
RUN git clone --branch v0.3.2 https://github.com/simpl/ngx_devel_kit.git
2919
RUN git clone --branch v0.10.25 https://github.com/openresty/lua-nginx-module.git
3020

31-
RUN wget http://nginx.org/download/nginx-1.27.4.tar.gz && tar zxvf nginx-1.27.4.tar.gz
21+
ARG NGINX_V=1.27.4
22+
RUN wget http://nginx.org/download/nginx-${NGINX_V}.tar.gz \
23+
&& tar zxf nginx-${NGINX_V}.tar.gz
3224

33-
WORKDIR /usr/src/nginx-1.27.4
25+
WORKDIR /usr/src/nginx-${NGINX_V}
3426
ENV LUAJIT_LIB=/usr/local/lib
3527
ENV LUAJIT_INC=/usr/local/include/luajit-2.1
3628

3729
RUN ./configure --with-compat \
38-
--with-pcre=/usr/local \
3930
--add-dynamic-module=../ngx_devel_kit \
4031
--add-dynamic-module=../lua-nginx-module \
4132
--with-ld-opt="-Wl,-rpath,/usr/local/lib" \
42-
&& make modules
33+
|| { echo '--- CONFIG.LOG ---'; cat objs/autoconf.err 2>/dev/null || true; exit 1; }
34+
35+
RUN make modules -j"$(nproc)"

0 commit comments

Comments
 (0)