Skip to content

Commit

Permalink
support building on CentOS 7
Browse files Browse the repository at this point in the history
  • Loading branch information
kmaehashi committed Jul 9, 2024
1 parent 721bb39 commit de94d8c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
7 changes: 6 additions & 1 deletion builder/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
ARG base_image
FROM ${base_image}

RUN yum -y install gcc gcc-c++ make patch git curl && \
COPY setup_yum_centos7.sh /

# Run twice for EPEL.
RUN /setup_yum_centos7.sh && \
yum -y install gcc gcc-c++ make patch git curl && \
yum -y install bzip2-devel openssl-devel readline-devel libffi-devel && \
yum -y install epel-release && \
yum-config-manager --disable epel && \
/setup_yum_centos7.sh && \
yum -y install --enablerepo=epel openssl11-devel && \
yum clean all

Expand Down
5 changes: 5 additions & 0 deletions builder/setup_yum_centos7.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash -uex

sed -i -E -e 's|^mirrorlist=|#mirrorlist=|g' /etc/yum.repos.d/*.repo
sed -i -E -e 's|^#(\w*)baseurl=http://mirror.centos.org/centos/(7\|\$releasever)/|baseurl=http://ftp.jaist.ac.jp/pub/Linux/CentOS-vault/7.9.2009/|g' /etc/yum.repos.d/*.repo
sed -i -E -e 's|^#(\w*)baseurl=http://download.fedoraproject.org/pub/epel/7/|baseurl=http://ftp.jaist.ac.jp/pub/Linux/Fedora/epel/7/|g' /etc/yum.repos.d/*.repo

0 comments on commit de94d8c

Please sign in to comment.