Asp.net

Docker 錯誤:註冊層失敗:處理 tar 文件時出錯(退出狀態 1):“…msader15.dll.mui:沒有這樣的文件或目錄”

  • February 6, 2021

我正在嘗試將我的 ASP.NET 4.7.2 WEB 服務建構到一個 docker 文件中,但是當我執行時

docker build -t manufacturing-portal-api:latest .

我收到以下錯誤:

failed to register layer: Error processing tar file(exit status 1): link /Files/Program Files/common files/system/ado/en-US/msader15.dll.mui /Files/Program Files (x86)/common files/system/ado/en-US/msader15.dll.mui: no such file or directory=> => sha256:d9e8b01179bfc94a5bdb1810fbd76b999aa52016001ace2d3a4c4bc7065a9601 1.66GB / 1.66GB                     0.0s

這是我的碼標頭檔

FROM microsoft/dotnet-framework:4.7.2-sdk-windowsservercore-1803 AS build
WORKDIR /app

# copy csproj and restore as distinct layers
COPY *.sln .
COPY WebPortalAPI/*.csproj ./WebPortalAPI/
COPY WebPortalAPI/*.config ./WebPortalAPI/
COPY ./instantclient_11_2 .
ENV PATH=./instantclient_11_2
ENV TNS_ADMIN=./instantclient_11_2/network/admin
RUN nuget restore

# copy everything else and build app
COPY WebPortalAPI/. ./WebPortalAPI/
WORKDIR /app/WebPortalAPI
RUN msbuild /p:Configuration=Release


FROM microsoft/aspnet:4.7.2-windowsservercore-1803 AS runtime
WORKDIR /inetpub/wwwroot
COPY --from=build /app/WebPortalAPI/. ./

請指教

您的 Docker 主機可能配置為在 VM 內執行 Linux 容器。要執行 Windows 容器,您需要在 Docker 菜單中“切換到 Windows 容器”。相關文件可在此處獲得

引用自:https://stackoverflow.com/questions/65978068