Skip to content
Snippets Groups Projects
Dockerfile 1.04 KiB
Newer Older
lcappelli's avatar
lcappelli committed
# Copyright 2018-2023 Istituto Nazionale di Fisica Nucleare
# SPDX-License-Identifier: EUPL-1.2

FROM centos:7

# 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 yum update -y && \
lcappelli's avatar
lcappelli committed
    sh /tmp/library-scripts/provide-deps.sh && \
    sh /tmp/library-scripts/provide-user.sh ${USERNAME} ${USER_UID} ${USER_GID} && \
    mkdir /pkgs && \
lcappelli's avatar
lcappelli committed
    yum clean all && rm -rf /var/cache/yum
COPY artifacts/*.rpm /pkgs/
# install nginx httpg + voms and njs dynamic modules (latest version)
lcappelli's avatar
lcappelli committed
COPY nginx.repo /etc/yum.repos.d/nginx.repo
RUN rpm -ivh /pkgs/nginx-httpg-1.24.0-1.el7.ngx.x86_64.rpm && \
    rpm -ivh /pkgs/nginx-module-http-voms-1.24.0-1.el7.x86_64.rpm && \
lcappelli's avatar
lcappelli committed
    yum install -y nginx-module-njs
# install nginx + voms and njs dynamic modules
lcappelli's avatar
lcappelli committed
# RUN yum -y install nginx nginx-module-njs && \
#     rpm -ivh /pkgs/nginx-module-http-voms-1.24.0-1.el7.x86_64.rpm
EXPOSE 80

STOPSIGNAL SIGQUIT

CMD ["nginx", "-g", "daemon off;"]