Skip to content

Commit

Permalink
Switching back to root required by openresty
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasleplus committed Apr 19, 2024
1 parent b2b822c commit d07dcd1
Showing 1 changed file with 2 additions and 19 deletions.
21 changes: 2 additions & 19 deletions openid-connect-provider-debugger/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@ FROM openresty/openresty:alpine

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

ARG USER_NAME=default
ARG USER_HOME=/home/default
ARG USER_ID=1000
ARG USER_GECOS=Default

# hadolint ignore=DL3018
RUN apk update \
&& apk --no-cache add curl patch perl \
Expand All @@ -18,23 +13,11 @@ RUN apk update \
COPY nginx.conf.patch /usr/local/openresty/nginx/conf/nginx.conf.patch

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
&& rm -f /usr/local/openresty/nginx/conf/nginx.conf.patch \
&& chmod o+rwx /var/run/openresty

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

COPY index.html /usr/local/openresty/nginx/html/index.html

RUN adduser \
--home "${USER_HOME}" \
--uid "${USER_ID}" \
--gecos "${USER_GECOS}" \
--disabled-password \
"${USER_NAME}"

ENV HOME "${USER_HOME}"

USER "${USER_NAME}"

WORKDIR "${HOME}"

EXPOSE 80 443

0 comments on commit d07dcd1

Please sign in to comment.