我正在尝试在Visual Studio Code中构建一个docker容器(我实际上正在使用IoT Edge模块)。该应用程序是IoT Edge的OPC Publisher模块,您可以找到here。我正在使用Windows 10
我有以下Dockerfile:
ARG runtime_base_tag=2.1-runtime-bionic-arm32v7
ARG build_base_tag=2.1-sdk-bionic-arm32v7
FROM microsoft/dotnet:${build_base_tag} AS build
WORKDIR /app
# copy csproj and restore as distinct layers
COPY ./src/*.csproj ./opcpublisher/
WORKDIR /app/opcpublisher
RUN dotnet restore
# copy and publish app
WORKDIR /app
COPY ./src/. ./opcpublisher/
WORKDIR /app/opcpublisher
RUN dotnet publish -c Release -o out
# start it up
FROM microsoft/dotnet:${runtime_base_tag} AS runtime
WORKDIR /app
COPY --from=build /app/opcpublisher/out ./
WORKDIR /appdata
ENTRYPOINT ["dotnet", "/app/opcpublisher.dll"]
运行命令docker build
时出现以下错误:
Step 7/16 : RUN dotnet restore
---> Running in d6bd61466c67
qemu: Unsupported syscall: 389
然后它无限期地等待,该过程不会因错误代码或其他原因退出。
.NET命令似乎有错误。我在Dockerfile中注释了步骤7,并且在步骤RUN dotnet publish -c Release -o out
我安装了qemu和.NET cli tools(这个?),但是仍然出现错误。
有人对这个问题有想法吗?
谢谢
编辑
当我以管理员身份运行VS代码时,我将获得以下附加输出:
Step 7/16 : RUN dotnet restore
---> Running in 293e6271cb65
qemu: Unsupported syscall: 389
qemu: uncaught target signal 11 (Segmentation fault) - core dumped
Segmentation fault
The command '/bin/sh -c dotnet restore' returned a non-zero code: 139
命令停止(不再无限期地等待)