docker - Docker构建返回非零代码:1 microsoft/dotnet

标签 docker .net-core

我的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/

相关文章:

maven - 澄清 Maven 配置文件和阶段

sql-server - 多个 Include/ThenInclude 在 EF Core 中导致重复

asp.net-core - .NET Core 静态代码分析工具

c# - 使用 Azure Kinect DK 将 In32Rect 坐标转换为 Span<BGRA>

docker - 如何在Dockerfile本身中设置断点?

docker - 本地 Laradock Nginx 项目上的 SSL 证书

Azure 函数从 Azure 应用程序配置配置计时器触发器

c# - linq 分组结果需要很长时间

docker - 将环境变量传递给 dockerfile 构建

networking - docker network 连接到主机的第二个接口(interface)