我的docker文件代码
FROM microsoft/dotnet:2.1-sdk
RUN curl -sL https://deb.nodesource.com/setup_8.x | bash - \
&& apt-get update \
&& apt-get install -y nuget \
&& apt-get install --reinstall make \
&& apt-get install build-essential -y \
&& apt-get install awscli -y \
&& apt-get install jq -y \
&& apt-get install zip -y \
&& apt-get install -y mysql-server \
&& apt-get install -y mono-complete \
&& apt-get install -y libxml-xpath-perl \
&& apt-get install -y nodejs
在步骤中运行curl -sL。我收到了错误
The command '/bin/sh -c curl -sL https://deb.nodesource.com/setup_8.x | bash - && apt-get update && apt-get install -y nuget && apt-get install --reinstall make && apt-get install build-essential -y && apt-get install awscli -y && apt-get install jq -y && apt-get install zip -y && apt-get install -y mysql-server && apt-get install -y mono-complete && apt-get install -y libxml-xpath-perl && apt-get install -y nodejs' returned a non-zero code: 1
有人知道如何解决此错误吗?
最佳答案
未安装Curl时,请在运行curl命令之前安装curl。
从Microsoft / dotnet:2.1-sdk
RUN apt-get update \
&& apt-get install curl \
&& curl -sL https://deb.nodesource.com/setup_8.x | bash - \
&& apt-get install -y nuget \
&& apt-get install --reinstall make \
&& apt-get install build-essential -y \
&& apt-get install awscli -y \
&& apt-get install jq -y \
&& apt-get install zip -y \
&& apt-get install -y mysql-server \
&& apt-get install -y mono-complete \
&& apt-get install -y libxml-xpath-perl \
&& apt-get install -y nodejs
关于docker - Docker构建返回非零代码:1 microsoft/dotnet,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58371274/