Skip to content

Commit

Permalink
Switch to alpine-fat openresty image (#39)
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasleplus authored May 31, 2024
1 parent 4c99f5f commit 882d403
Showing 1 changed file with 7 additions and 14 deletions.
21 changes: 7 additions & 14 deletions openid-connect-provider-debugger/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,24 +1,17 @@
# checkov:skip=CKV_DOCKER_3
FROM openresty/openresty:1.25.3.1-alpine@sha256:bb29ac9303db64bf2736766fa2b2b9904b50514f9e3733ce81e1b8d0e65d2a69
FROM openresty/openresty:1.25.3.1-alpine-fat@sha256:b60db904c43ac309ab0a54c997e19b84fb70cc456142febe7e2767a8b37383ee

HEALTHCHECK CMD ["/usr/bin/curl", "-i", "-s", "-S", "-f", "http://localhost"]

COPY nginx.conf.patch /usr/local/openresty/nginx/conf/

# hadolint ignore=DL3018,DL4006
RUN apk update \
&& LUA_VERSION=$(echo /usr/local/openresty/pod/lua-[0-9]*.[0-9]*.[0-9]* | sed -e 's!^/usr/local/openresty/pod/lua-!!; s/\.[0-9]*$//') \
&& echo "LUA_VERSION=${LUA_VERSION}" \
&& LUA_INCDIR=$(echo /usr/local/openresty/luajit/include/luajit-*) \
&& echo "LUA_INCDIR=${LUA_INCDIR}" \
&& apk --no-cache add curl "luarocks${LUA_VERSION}" patch \
&& apk --no-cache add curl patch \
&& rm -rf /var/cache/apk/* \
&& "luarocks-${LUA_VERSION}" config variables.LUA_INCDIR "${LUA_INCDIR}" \
&& "luarocks-${LUA_VERSION}" install lua-resty-openidc

COPY nginx.conf.patch /usr/local/openresty/nginx/conf/

RUN patch /usr/local/openresty/nginx/conf/nginx.conf /usr/local/openresty/nginx/conf/nginx.conf.patch \
&& rm -f /usr/local/openresty/nginx/conf/nginx.conf.patch \
&& chmod o+rwx /var/run/openresty
&& /usr/local/openresty/luajit/bin/luarocks install lua-resty-openidc \
&& patch /usr/local/openresty/nginx/conf/nginx.conf /usr/local/openresty/nginx/conf/nginx.conf.patch \
&& rm -f /usr/local/openresty/nginx/conf/nginx.conf.patch

COPY default.conf /etc/nginx/conf.d/

Expand Down

0 comments on commit 882d403

Please sign in to comment.