Skip to content
Snippets Groups Projects
Dockerfile 1.19 KiB
Newer Older
  • Learn to ignore specific revisions
  • FROM centos:7
    
    # Allow customization of build user ID and name
    
    lcappelli's avatar
    lcappelli committed
    ARG VSCODE_USER=vscode
    ARG VSCODE_USER_UID=1000
    
    lcappelli's avatar
    lcappelli committed
    ENV VSCODE_USER $VSCODE_USER
    ENV VSCODE_USER_UID $VSCODE_USER_UID
    
    
    RUN echo "include_only=.garr.it,.cern.ch" >> /etc/yum/pluginconf.d/fastestmirror.conf && \
          yum clean all && \
          yum install -y hostname epel-release && \
          yum -y update && \
          yum -y install which wget tar sudo file && \
          echo '%wheel ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers && \
    
    lcappelli's avatar
    lcappelli committed
          adduser --uid ${VSCODE_USER_UID} ${VSCODE_USER} && \
          usermod -a -G wheel ${VSCODE_USER} && \
    
          yum clean all && \
          rm -rf /var/cache/yum
    
    ADD assets/setup.sh /docker/
    ADD assets/user-setup.sh /docker/
    ADD assets/build-install-openresty.sh /docker/
    
    lcappelli's avatar
    lcappelli committed
    ADD --chown=$VSCODE_USER:$VSCODE_USER assets/nginx-httpg_no_delegation.patch /home/$VSCODE_USER/
    ADD --chown=$VSCODE_USER:$VSCODE_USER assets/build-install-ngx-voms.sh /home/$VSCODE_USER/bin/
    
    RUN sh /docker/setup.sh
    
    
    lcappelli's avatar
    lcappelli committed
    USER $VSCODE_USER
    
    
    RUN sh /docker/build-install-openresty.sh \
        && sh /docker/user-setup.sh
    
    
    USER root
    
    RUN yum install -y https://repo.ius.io/ius-release-el7.rpm centos-release-scl \
        && yum install -y git224 devtoolset-10
    
    
    lcappelli's avatar
    lcappelli committed
    USER $VSCODE_USER