I am trying to build my ASP.NET 4.7.2 WEB Services into a docker file, however when I run
docker build -t manufacturing-portal-api:latest .
I get the following error:
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
This is my docker file
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/. ./
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
Your Docker host is likely configured to run Linux containers inside of a VM. To run Windows containers, you need to “Switch to Windows containers” in the Docker menu. Documentation on that is available here.