Skip to content

Commit

Permalink
fixup! ci(konflux): add /licenses folder for konflux
Browse files Browse the repository at this point in the history
  • Loading branch information
bruno-fs committed Jan 15, 2025
1 parent 7bfde06 commit 4bae948
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,21 @@ ARG K8S_DISPLAY_NAME="quipucords-ui"
ARG K8S_NAME="quipucords/quipucords-ui"
ARG OCP_TAGS="quipucords"
ARG REDHAT_COMPONENT="quipucords-ui-container"
# change user - this is required to be able to create /licenses folder
# original NGINX user; update if the number ever change
# https://github.com/sclorg/nginx-container/blob/e7d8db9bc5299a4c4e254f8a82e917c7c136468b/1.22/Dockerfile.rhel9#L84
ENV NGINX_USER=1001
USER root
RUN mkdir /licenses
# TODO: cachi2 doesn't officially support dnf yet
# RUN dnf update -y && dnf clean all
RUN mkdir /licenses && chown 1001:1001 -R /licenses
# go back to original nginx user
USER 1001
COPY --from=npm_builder /app/LICENSE /licenses/LICENSE
COPY --from=npm_builder /app/build /opt/app-root/src
COPY deploy/nginx.conf /etc/nginx/nginx.conf.template
COPY deploy/entrypoint.sh /opt/app-root/.
# set ownership to nginx user and revert back to it
RUN chown ${NGINX_USER} -R /licenses /opt/app-root/
USER ${NGINX_USER}

CMD ["/bin/bash", "/opt/app-root/entrypoint.sh"]

LABEL com.redhat.component=${REDHAT_COMPONENT} \
Expand Down

0 comments on commit 4bae948

Please sign in to comment.