dotnet core 2.0命令未在docker中运行

时间:2018-02-25 22:34:40

标签: docker .net-core dockerfile

我正在尝试设置我的dotnet核心应用程序以在我的mac上运行docker。我的Dockerfile如下所示:

FROM microsoft/dotnet:sdk AS build-env
WORKDIR /app

# copy csproj and restore as distinct layers
COPY *.csproj ./
RUN dotnet restore

# copy everything else and build
COPY . ./
RUN dotnet publish -c Release -o out

# build runtime image
FROM microsoft/dotnet:runtime
WORKDIR /app
COPY --from=build-env /app/out ./
ENTRYPOINT ["dotnet", "backend.dll"]

当我跑步时:docker build -t backend .

我明白了:

Sending build context to Docker daemon  1.133MB
Step 1/10 : FROM microsoft/dotnet:sdk AS build-env
 ---> 76d532b4a0ca
Step 2/10 : WORKDIR /app
 ---> Using cache
 ---> 9c04cc3784c1
Step 3/10 : COPY *.csproj ./
 ---> Using cache
 ---> 18b53c11abd6
Step 4/10 : RUN dotnet restore
 ---> Running in 46f3843faad7
Aborted
The command '/bin/sh -c dotnet restore' returned a non-zero code: 134

我做了一些调试,并注意到当我运行任何dotnet命令时它就会发生炸弹袭击。我运行了dotnet --info,它显示了信息,但也显示了Aborted。任何建议都将不胜感激。

0 个答案:

没有答案