Files
sa-charts/builder-docker/nodejs/Dockerfile
2021-12-27 14:38:06 +08:00

33 lines
1.3 KiB
Docker

FROM kubespheredev/builder-base
ENV NODE_VERSION 12.22.8
RUN yum -y install gcc-c++ && yum -y groupinstall 'Development Tools'
RUN wget -q -O - https://nodejs.org/dist/v12.22.8/node-v12.22.8-linux-x64.tar.gz \
| tar --strip-components=1 -xzf - -C /usr/local \
&& rm -rf node-v12.22.8-linux-x64.tar.gz \
&& node -v && npm -v
RUN npm install -g yarn \
&& yarn config set registry https://mirrors.huaweicloud.com/repository/npm/ \
&& yarn config set disturl https://mirrors.huaweicloud.com/nodejs/ \
&& yarn config set electron_mirror https://mirrors.huaweicloud.com/electron/ \
&& yarn config set registry https://registry.npm.taobao.org \
&& yarn config set disturl https://npm.taobao.org/dist \
&& yarn config set electron_mirror https://npm.taobao.org/mirrors/electron/ \
&& yarn config set cache-folder /root/.yarn
# RUN wget https://www.python.org/ftp/python/3.6.8/Python-3.6.8.tar.xz \
# && xz -d Python-3.6.8.tar.xz && tar -xf Python-3.6.8.tar \
# && cd Python-3.6.8 && ./configure prefix=/usr/local/python3 \
# && make && make install \
# && yum install -y zlib zlib-devel \
# && rm -rf /usr/bin/python && ln -s /usr/local/python3/bin/python3.6 /usr/bin/python \
# && python -V
CMD ["yarn","version"]
#docker build -f Dockerfile -t marsal1212/builder-nodejs:latest .