failure in a Windows system call: The system cannot find the file specified (Docker)

  asp.net, c#, docker

I am trying to get a .NET web application to run inside of a docker container on a windows 2016 server (Version: 10.0.14393). The web app is very simple and I used a tutorial here to make the application in Visual Studio. Here is all the info about the version of docker I have running on my computer:

  • Client: Mirantis Container Runtime
    • Version: 20.10.5
    • API Version: 1.41
    • Go Version: go1.13.15
    • Git commit: 105e9a6
    • Built: 05/17/2021 16:36:02
    • OS/Arch: windows/amd64
    • Context: default
    • Experimental: true
  • Server: Mirantis Container Runtime
    • Version: 20.10.5
    • API Version: 1.41
    • Go Version: go1.13.15
    • Git commit: 1a7d997053
    • Built: 05/17/2021 16:34:40
    • OS/Arch: windows/amd64
    • Experimental: false

The issue occurs after successfully building the image and go to run the newly created image, I get this error:

docker: Error response from daemon: container "containerID" encountered an error during hcsshim::System::CreateProcess: failure in a Windows system call: The system cannot find the file specified. (0x2) extra info: {"CommandLine":"dotnet wrld.dll server.urls http://localhost:4300","WorkingDirectory":"C:app","Environment":{"COMPLUS_NGenProtectedProcess_FeatureEnabled":"0"},"CreateStdInPipe":true,"CreateStdOutPipe":true,"CreateStdErrPipe":true,"ConsoleSize":[0,0]}.

I am fairly new to docker and web apps so I have no idea what this error is trying to tell me besides a potential path issue. Any tips or help would be greatly appreciated!
I also have my dockerfile if it helps:

FROM mcr.microsoft.com/dotnet/framework/sdk:3.5 AS build

WORKDIR /app

// Copy csproj and restore

COPY  /*.csproj ./

RUN dotnet restore

// Copy everything else and build

COPY . . 

RUN dotnet publish -c release -o out

// Build runtime image

FROM mcr.microsoft.com/dotnet/framework/runtime:3.5 AS runtime

WORKDIR /app

COPY --from=build /app/out .

ENTRYPOINT ["dotnet", "wrld.dll", "server.urls", "http://localhost:4300"]

Source: Docker Questions

LEAVE A COMMENT