forked from criblio/js2bin
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.centos7
More file actions
28 lines (22 loc) · 1.34 KB
/
Dockerfile.centos7
File metadata and controls
28 lines (22 loc) · 1.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
FROM centos:7
# use Centos vault for downloading
RUN 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
RUN yum install -y centos-release-scl
# installing centos-release-scl adds the Software Collections repo to Yum's configuration,
# so the following replacement should be used for downloading from Centos vault
RUN 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
# use node 10 as it's guaranteed to run on CentOS6
RUN yum-config-manager --enable rhel-server-rhscl-7-rpms && \
yum install -y devtoolset-8 python36 wget patch && \
wget -q https://nodejs.org/dist/v10.23.0/node-v10.23.0-linux-x64.tar.gz && \
tar -xf node-v10.23.0-linux-x64.tar.gz && \
rm node-v10.23.0-linux-x64.tar.gz && \
ln -s /node-v10.23.0-linux-x64/bin/node /bin/node && \
ln -s /node-v10.23.0-linux-x64/bin/npm /bin/npm
# before building using this container you need to enable the right slc toolchain ie
# scl enable devtoolset-8 '<your-build-command-here>'
# or 'source /opt/rh/devtoolset-8/enable'