Docker CentOS image NodeJS

我正在尝试在Docker CentOs上安装NodeJS:下面是我的dockerfile:

FROM centos:7.3.1611 ADD https://rpm.nodesource.com/setup_8.x /root/ #RUN curl -sL https://rpm.nodesource.com/setup_8.x RUN bash /root/setup_8.x ;\ yum -y install nodejs ;\ yum -y install java-1.8.0-openjdk #removed the rest of code 

我使用下面的方法来构build容器:

 docker-compose build --no-cache 

输出如下:

 Building test Step 1/3 : FROM centos:7.3.1611 ---> 67591570dd29 Step 2/3 : ADD https://rpm.nodesource.com/setup_8.x /root/ ---> 92d4f540a9e8 Removing intermediate container d4cef3605bdd Step 3/3 : RUN bash /root/setup_8.x ; yum -y install nodejs ; yum -y install java-1.8.0-openjdk ---> Running in 2c331b5211c7 ## Installing the NodeSource Node.js 8.x repo... ## Inspecting system... + rpm -q --whatprovides redhat-release || rpm -q --whatprovides centos-release || rpm -q --whatprovides cloudlinux-release || rpm -q --whatprovides sl-release + uname -m ## Confirming "el7-x86_64" is supported... + curl -sLf -o /dev/null 'https://rpm.nodesource.com/pub_8.x/el/7/x86_64/nodesource-release-el7-1.noarch.rpm' ## Your distribution, identified as "centos-release-7-3.1611.el7.centos.x86_64", is not currently supported, please contact NodeSource at https://github.com/nodesource/distributions/issues if you think this is incorrect or would like your distribution to be considered for support 

看来问题是'exec_cmd_nobail'curl -sLf -o / dev / null'$ {RELEASE_URL}''在安装脚本返回非零输出,任何提示吗?这个问题是没有看到像一个星期前,当我尝试,我猜Docker Centos映像有变化吗?

=======================

  • 解决! 答案在评论中。 谢谢!