Docker run gives "CreateProcess: failure in a Windows system call: The system cannot find the file specified. (0x2)" Docker run gives "CreateProcess: failure in a Windows system call: The system cannot find the file specified. (0x2)" docker docker

Docker run gives "CreateProcess: failure in a Windows system call: The system cannot find the file specified. (0x2)"


This line COPY ./publish . will copy all publish files into your current work directory. The bin folder that contains your DLL now lives here: /app/bin/{your dll}.

It is not necessary to then change the work dir to bin like you did; instead, you could either leave your work dir alone (stay in /app) and specify your entrypoint as:
ENTRYPOINT ["dotnet", "./bin/HelloWorldDocker.dll"]

-OR-

You could set your WORKDIR to /app/bin and specify your entrypoint as you already did: ENTRYPOINT ["dotnet", "HelloWorldDocker.dll"]

The main thing you need to keep in mind is where the files are in relation to your workdir, which you can manage by changing your workdir as well as copying files, as you did by copying all publish files into /app