Skip to content

Commit

Permalink
Fix centos 7 Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
iamluc committed Jul 2, 2024
1 parent eab1560 commit 50cd7ea
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
11 changes: 10 additions & 1 deletion dockerfiles/ci/centos/7/base.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
FROM centos:7

RUN set -eux; \
# Fix yum config, as centos 7 is EOL and mirrorlist.centos.org does not resolve anymore
# https://serverfault.com/a/1161847
sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo; \
sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/*.repo; \
sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/*.repo; \
echo 'ip_resolve = IPv4' >>/etc/yum.conf; \
yum update -y; \
yum install -y \
Expand All @@ -21,8 +26,12 @@ RUN set -eux; \
unzip \
vim \
xz; \
# package centos-release-scl installs new yum repos, we must fix them too
sed -i s/mirror.centos.org/buildlogs.centos.org/g /etc/yum.repos.d/CentOS-SCLo-*.repo; \
sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/CentOS-SCLo-*.repo; \
sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/CentOS-SCLo-*.repo; \
yum update nss nss-util nss-sysinit nss-tools; \
yum install -y devtoolset-7; \
yum install -y --nogpgcheck devtoolset-7; \
yum clean all;

ENV SRC_DIR=/usr/local/src
Expand Down
1 change: 1 addition & 0 deletions dockerfiles/ci/centos/7/download-src.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/usr/bin/env bash
set -e

if [ -z "$SRC_DIR" ]; then
Expand Down

0 comments on commit 50cd7ea

Please sign in to comment.