Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions dev-support/docker/Dockerfile_centos_7
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,13 @@ COPY pkg-resolver pkg-resolver
RUN chmod a+x pkg-resolver/*.sh pkg-resolver/*.py \
&& chmod a+r pkg-resolver/*.json

######
# Centos 7 has reached its EOL and the packages
# are no longer available on mirror.centos.org site.
# Please see https://www.centos.org/centos-linux-eol/
######
RUN pkg-resolver/set-vault-as-baseurl-centos.sh centos:7

######
# Install packages from yum
######
Expand All @@ -38,8 +45,13 @@ RUN yum update -y \
&& yum groupinstall -y "Development Tools" \
&& yum install -y \
centos-release-scl \
python3 \
&& yum install -y $(pkg-resolver/resolve.py centos:7)
python3

# Apply the script again because centos-release-scl creates new YUM repo files
RUN pkg-resolver/set-vault-as-baseurl-centos.sh centos:7

# hadolint ignore=DL3008,SC2046
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I readed our previous Dockerfiles and found that DL3008 and SC2046 were not ignored. Why we should ignore these two rules here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RUN yum install -y $(pkg-resolver/resolve.py centos:7)

# Set GCC 9 as the default C/C++ compiler
RUN echo "source /opt/rh/devtoolset-9/enable" >> /etc/bashrc
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ fi
if [ "$1" == "centos:7" ] || [ "$1" == "centos:8" ]; then
cd /etc/yum.repos.d/ || exit &&
sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* &&
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-* &&
sed -i 's|# *baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-* &&
Copy link
Member Author

@pan3793 pan3793 Jul 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change is necessary, this makes it support both

#baseurl=http://mirror.centos.org/...
# baseurl=http://mirror.centos.org/...

yum update -y &&
cd /root || exit
else
Expand Down