File tree Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,13 @@ COPY pkg-resolver pkg-resolver
3030RUN chmod a+x pkg-resolver/*.sh pkg-resolver/*.py \
3131    && chmod a+r pkg-resolver/*.json
3232
33+ ######
34+ # Centos 7 has reached its EOL and the packages
35+ # are no longer available on mirror.centos.org site.
36+ # Please see https://www.centos.org/centos-linux-eol/
37+ ######
38+ RUN pkg-resolver/set-vault-as-baseurl-centos.sh centos:7
39+ 
3340######
3441# Install packages from yum
3542######
@@ -38,8 +45,12 @@ RUN yum update -y \
3845    && yum groupinstall -y "Development Tools" \
3946    && yum install -y \
4047        centos-release-scl \
41-         python3 \
42-     && yum install -y $(pkg-resolver/resolve.py centos:7)
48+         python3
49+ 
50+ # Apply the script again because centos-release-scl creates new YUM repo files
51+ RUN pkg-resolver/set-vault-as-baseurl-centos.sh centos:7
52+ 
53+ RUN yum install -y $(pkg-resolver/resolve.py centos:7)
4354
4455# Set GCC 9 as the default C/C++ compiler
4556RUN echo "source /opt/rh/devtoolset-9/enable" >> /etc/bashrc
Original file line number Diff line number Diff line change 2424if  [ " $1 "   ==  " centos:7"   ] ||  [ " $1 "   ==  " centos:8"   ];  then 
2525  cd  /etc/yum.repos.d/ ||  exit  && 
2626    sed -i ' s/mirrorlist/#mirrorlist/g'   /etc/yum.repos.d/CentOS-*  && 
27-     sed -i ' s|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g'   /etc/yum.repos.d/CentOS-*  && 
27+     sed -i ' s|# * baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g'   /etc/yum.repos.d/CentOS-*  && 
2828    yum update -y && 
2929    cd  /root ||  exit 
3030else 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments