# Copyright 2018-2023 Istituto Nazionale di Fisica Nucleare # SPDX-License-Identifier: EUPL-1.2 ARG EL_VERSION=9 FROM almalinux:${EL_VERSION} # https://docs.docker.com/reference/dockerfile/#understand-how-arg-and-from-interact ARG EL_VERSION # Allow customization of nginx user ID and name ARG USERNAME=nginx ARG USER_UID=1000 ARG USER_GID=${USER_UID} # install dependencies COPY library-scripts/*.sh /tmp/library-scripts/ RUN dnf update -y && \ sh /tmp/library-scripts/provide-deps.sh && \ sh /tmp/library-scripts/provide-user.sh ${USERNAME} ${USER_UID} ${USER_GID} && \ mkdir /pkgs && \ dnf clean all && rm -rf /var/cache/dnf COPY artifacts/*.rpm /pkgs/ # install nginx httpg + voms and njs dynamic modules (latest version) COPY nginx.repo /etc/yum.repos.d/nginx.repo RUN rpm -ivh /pkgs/nginx-*.el${EL_VERSION}.httpg.x86_64.rpm && \ rpm -ivh /pkgs/nginx-module-http-voms-*.el${EL_VERSION}.x86_64.rpm && \ dnf install -y nginx-module-njs \ # forward request and error logs to docker log collector && ln -sf /dev/stdout /var/log/nginx/access.log \ && ln -sf /dev/stderr /var/log/nginx/error.log # install nginx + voms and njs dynamic modules # RUN dnf -y install nginx nginx-module-njs && \ # rpm -ivh /pkgs/nginx-module-http-voms-1.24.0-1.el${EL_VERSION}.x86_64.rpm EXPOSE 80 STOPSIGNAL SIGQUIT CMD ["nginx", "-g", "daemon off;"]