Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to alpine-fat openresty image #39

Merged
merged 3 commits into from
May 31, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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