-
-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8baee91
commit e2b6cf5
Showing
7 changed files
with
14 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,12 +28,9 @@ ARG EXTENDED_IMAGE=1 | |
ENV EXTENDED_IMAGE=$EXTENDED_IMAGE | ||
|
||
# lua | ||
ARG VER_LUA=5.4 | ||
ARG VER_LUA=5.4.3 | ||
ENV VER_LUA=$VER_LUA | ||
|
||
ENV MYCFLAGS=" -DLUA_COMPAT_5_1" | ||
ENV LUA_INCDIR=/usr/local/include/luajit-2.1 | ||
|
||
# ngx_devel_kit | ||
# https://github.com/vision5/ngx_devel_kit/releases | ||
# The NDK is now considered to be stable. | ||
|
@@ -48,6 +45,7 @@ ARG LUAJIT_LIB=/usr/local/lib | |
ENV LUAJIT_LIB=$LUAJIT_LIB | ||
ARG LUAJIT_INC=/usr/local/include/luajit-2.1 | ||
ENV LUAJIT_INC=$LUAJIT_INC | ||
ENV LUA_INCDIR=$LUAJIT_INC | ||
ARG LD_LIBRARY_PATH=/usr/local/lib/:$LD_LIBRARY_PATH | ||
ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH | ||
|
||
|
@@ -118,7 +116,7 @@ ENV VER_OPENRESTY_WEBSOCKET=$VER_OPENRESTY_WEBSOCKET | |
|
||
# lua-rocks | ||
# https://luarocks.github.io/luarocks/releases/ | ||
ARG VER_LUAROCKS=3.7.0 | ||
ARG VER_LUAROCKS=3.8.0 | ||
ENV VER_LUAROCKS=$VER_LUAROCKS | ||
|
||
# lua-upstream-nginx-module | ||
|
@@ -237,25 +235,12 @@ RUN set -eux \ | |
&& apk add --no-cache \ | ||
$BUILD_DEPS \ | ||
$NGINX_BUILD_DEPS \ | ||
&& curl -R -O http://www.lua.org/ftp/lua-5.4.3.tar.gz \ | ||
&& tar zxf lua-5.4.3.tar.gz \ | ||
&& cd lua-5.4.3 \ | ||
#&& sed -i "s/MYCFLAGS=.*/MYCFLAGS=$MYCFLAGS/" src/Makefile \ | ||
&& sed -i "s/DLUA_COMPAT_5_3/DLUA_COMPAT_5_1/" src/Makefile \ | ||
&& make all test && make install \ | ||
&& cd .. \ | ||
&& curl -L -O https://luarocks.org/releases/luarocks-3.8.0.tar.gz \ | ||
&& tar zxpf luarocks-3.8.0.tar.gz \ | ||
&& cd luarocks-3.8.0 \ | ||
&& ./configure --with-lua-include=/usr/local/include \ | ||
&& make \ | ||
&& make install \ | ||
&& cd .. \ | ||
&& [ $EXTENDED_IMAGE -eq 1 ] && \ | ||
NGINX_BUILD_CONFIG="${NGINX_BUILD_CONFIG} \ | ||
--add-module=/headers-more-nginx-module-${VER_OPENRESTY_HEADERS} \ | ||
--add-module=/stream-lua-nginx-module-${VER_OPENRESTY_STREAMLUA} \ | ||
" \ | ||
&& make -j "$(nproc)" lua-src \ | ||
&& make -j "$(nproc)" deps \ | ||
&& make -j "$(nproc)" core \ | ||
&& make -j "$(nproc)" luarocks | ||
|
@@ -301,8 +286,6 @@ LABEL maintainer="Fabio Cicerchia <[email protected]>" \ | |
|
||
ARG PKG_DEPS="\ | ||
geoip-dev \ | ||
lua${VER_LUA} \ | ||
lua${VER_LUA}-dev \ | ||
openssl-dev \ | ||
pcre-dev \ | ||
unzip \ | ||
|
@@ -320,7 +303,7 @@ COPY --from=builder /usr/local/bin/lua /usr/local/bin/lua | |
COPY --from=builder /usr/local/bin/luajit /usr/local/bin/luajit | ||
COPY --from=builder /usr/local/bin/luarocks /usr/local/bin/luarocks | ||
COPY --from=builder /usr/local/etc/luarocks /usr/local/etc/luarocks | ||
COPY --from=builder /usr/local/include/luajit-2.1 /usr/local/include/luajit-2.1 | ||
COPY --from=builder $LUAJIT_INC $LUAJIT_INC | ||
|
||
SHELL ["/bin/ash", "-eo", "pipefail", "-c"] | ||
|
||
|
@@ -329,8 +312,6 @@ RUN set -eux \ | |
&& apk update \ | ||
&& apk add --no-cache --virtual .pkg_deps \ | ||
$PKG_DEPS \ | ||
# Fix LUA alias | ||
#&& ln -sf /usr/bin/lua${VER_LUA} /usr/local/bin/lua \ | ||
# Bring in gettext so we can get `envsubst`, then throw | ||
# the rest away. To do this, we need to install `gettext` | ||
# then move `envsubst` out of the way so `gettext` can | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters