Skip to content

Commit d1249bb

Browse files
committed
Fix centos 7
1 parent b1cdfdd commit d1249bb

File tree

2 files changed

+22
-2
lines changed

2 files changed

+22
-2
lines changed

centos7-devtoolset8-arm64/Dockerfile

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,21 @@ ARG INSTALL_PKGS="devtoolset-8-gcc \
1414
krb5-devel \
1515
python3"
1616

17-
RUN yum install -y centos-release-scl-rh && \
17+
# Fix CentOS 7 EOL repo issue
18+
RUN cd /etc/yum.repos.d/ && \
19+
sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* && \
20+
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-* && \
21+
yum install -y centos-release-scl-rh && \
22+
sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-SCLo-* && \
23+
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-SCLo-* && \
1824
yum install -y --setopt=tsflags=nodocs $INSTALL_PKGS && \
1925
rpm -V $INSTALL_PKGS && \
2026
yum -y clean all --enablerepo='*'
2127

28+
# install nodejs and npm
29+
RUN curl -sL https://rpm.nodesource.com/setup_16.x | bash - && \
30+
yum install -y nodejs
31+
2232
# update npm and install yarn
2333
RUN npm install -g "[email protected]"
2434
RUN npm install -g yarn

centos7-devtoolset8-x64/Dockerfile

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,21 @@ ARG INSTALL_PKGS="devtoolset-8-gcc \
1414
krb5-devel \
1515
python3"
1616

17-
RUN yum install -y centos-release-scl-rh && \
17+
# Fix CentOS 7 EOL repo issue
18+
RUN cd /etc/yum.repos.d/ && \
19+
sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* && \
20+
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-* && \
21+
yum install -y centos-release-scl-rh && \
22+
sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-SCLo-* && \
23+
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-SCLo-* && \
1824
yum install -y --setopt=tsflags=nodocs $INSTALL_PKGS && \
1925
rpm -V $INSTALL_PKGS && \
2026
yum -y clean all --enablerepo='*'
2127

28+
# install nodejs and npm
29+
RUN curl -sL https://rpm.nodesource.com/setup_16.x | bash - && \
30+
yum install -y nodejs
31+
2232
# update npm and install yarn
2333
RUN npm install -g "[email protected]"
2434
RUN npm install -g yarn

0 commit comments

Comments
 (0)