Skip to content

Commit 25cc90f

Browse files
committed
feat(lua): use external luarocks spec file
1 parent df27a4e commit 25cc90f

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

openid-connect-provider-debugger/Dockerfile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
FROM openresty/openresty:1.27.1.2-5-alpine-fat@sha256:93ef9740bc88601961162153605ba67e545b73ee813aa8fedc27cbffc106bea2
22

3-
ARG LUA_RESTY_OPENIDC_VERSION="1.8.0-1"
43
ARG USER_NAME=openresty
54
ARG USER_HOME=/home/openresty
65
ARG USER_ID=1000
@@ -19,12 +18,13 @@ RUN apk upgrade --no-cache \
1918
&& apk cache --no-cache clean \
2019
&& rm -rf /var/cache/apk/*
2120

21+
COPY openid-connect-provider-debugger-0.0.0.rockspec /tmp/openid-connect-provider-debugger-0.0.0.rockspec
22+
2223
# We let lua-resty-session get pulled transitively to ensure compatibility
23-
RUN if [ -z "${LUA_RESTY_OPENIDC_VERSION}" ]; then \
24-
luarocks install lua-resty-openidc ; \
25-
else \
26-
luarocks install lua-resty-openidc --pin "${LUA_RESTY_OPENIDC_VERSION}" ; \
27-
fi
24+
RUN lua -e 'dofile("/tmp/openid-connect-provider-debugger-0.0.0.rockspec"); for _, dep in ipairs(dependencies) do local package, version = dep:match("^(.+)%s*==%s*(.+)$"); if package and version then print(package .. " " .. version) end end' | while read package version ; do \
25+
luarocks install "${package}" --pin "${version}" ; \
26+
done ; \
27+
rm -f /tmp/openid-connect-provider-debugger-0.0.0.rockspec
2828

2929
RUN patch /usr/local/openresty/nginx/conf/nginx.conf /usr/local/openresty/nginx/conf/nginx.conf.patch \
3030
&& rm -f /usr/local/openresty/nginx/conf/nginx.conf.patch
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
package = "openid-connect-provider-debugger"
2+
version = "0.0.0"
3+
source = {
4+
url = "git://github.com/leplusorg/openid-connect-provider-debugger.git"
5+
}
6+
dependencies = {
7+
"lua-resty-openidc == 1.8.0-1"
8+
}

0 commit comments

Comments
 (0)