From 44413da70746a19069e6e126a074c813201a91e2 Mon Sep 17 00:00:00 2001 From: Neil Cook Date: Tue, 4 Jun 2024 21:09:33 +0100 Subject: [PATCH] Install minimal set of lua modules as part of docker-minimal image to match packages --- docker/wforce_image/Dockerfile.minimal | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/docker/wforce_image/Dockerfile.minimal b/docker/wforce_image/Dockerfile.minimal index de41acbb..62b35000 100644 --- a/docker/wforce_image/Dockerfile.minimal +++ b/docker/wforce_image/Dockerfile.minimal @@ -1,3 +1,25 @@ +FROM alpine:3.19 as lua_build + +RUN apk update && \ + apk add \ + luajit-dev \ + luarocks5.1 \ + gcc \ + musl-dev \ + openssl-dev \ + hiredis-dev \ + openldap-dev + +RUN luarocks-5.1 config variables.LUA_INCDIR /usr/include/luajit-2.1 + +RUN luarocks-5.1 install elasticsearch-lua && \ + luarocks-5.1 install lua-cjson && \ + luarocks-5.1 install lualdap && \ + luarocks-5.1 install luasocket && \ + luarocks-5.1 install luasec && \ + luarocks-5.1 install lua-resty-template && \ + luarocks-5.1 install redis-lua + FROM alpine:3.19 as wforce_build RUN apk update && \ @@ -68,12 +90,15 @@ FROM alpine:3.19 as wforce_image WORKDIR /wforce/ COPY --from=wforce_build /wforce/install/ / +COPY --from=lua_build /usr/local/share/lua /usr/local/share/lua +COPY --from=lua_build /usr/local/lib/lua /usr/local/lib/lua RUN apk update && \ apk add \ boost-filesystem \ curl \ openssl \ + libldap \ hiredis \ readline \ libmaxminddb \