Skip to content

Commit 23c1975

Browse files
committed
Fix centos 7
1 parent cbc7d42 commit 23c1975

File tree

2 files changed

+26
-8
lines changed

2 files changed

+26
-8
lines changed

centos7-devtoolset8-arm64/Dockerfile

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,23 @@ ARG INSTALL_PKGS="devtoolset-8-gcc \
1212
krb5-devel \
1313
python3"
1414

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

20-
# install nodejs
21-
RUN yum install https://rpm.nodesource.com/pub_16.x/nodistro/repo/nodesource-release-nodistro-1.noarch.rpm -y
22-
RUN yum install nodejs -y --setopt=nodesource-nodejs.module_hotfixes=1
26+
# install nodejs and npm
27+
RUN curl -sL https://rpm.nodesource.com/setup_16.x | bash - && \
28+
yum install -y nodejs
29+
30+
# update npm and install yarn
31+
RUN npm install -g "[email protected]"
2332
RUN npm install -g yarn
2433
RUN npm install -g node-gyp
2534

centos7-devtoolset8-x64/Dockerfile

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,23 @@ 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

22-
# install nodejs
23-
RUN yum install https://rpm.nodesource.com/pub_16.x/nodistro/repo/nodesource-release-nodistro-1.noarch.rpm -y
24-
RUN yum install nodejs -y --setopt=nodesource-nodejs.module_hotfixes=1
28+
# install nodejs and npm
29+
RUN curl -sL https://rpm.nodesource.com/setup_16.x | bash - && \
30+
yum install -y nodejs
31+
32+
# update npm and install yarn
33+
RUN npm install -g "[email protected]"
2534
RUN npm install -g yarn
2635
RUN npm install -g node-gyp
2736

0 commit comments

Comments
 (0)