After following the steps and checking over them, as well as attempting subtle changes in an attempt to get it to work on my own, the final command does not work for me.
I get the following: No executable found matching command "dotnet-out/Hello.dll".
This is my first attempt at trying Docker so I won't be surprised if it is something I have done, was just looking for guidance as I don't see in the documents a step for remedying the issue.
For reference, my Docker version is 18.09.0 and dotnet --version is 2.1.5. If its useful, my Ubuntu is 18.04 as well.
Thank you for the guide either way though!
âš Do not edit this section. It is required for docs.microsoft.com âžź GitHub issue linking.
Ran into this as well, watch the casing on the “Hello.dll”. It has to match the casing of the folder name. If you named the folder “hello”, change dockerfile to “hello.dll”. File names/folder names are case sensitive in Linux.
The DLL will match the directory name where you ran dotnet new console (you can also use the -o <dirname> flag create the project in a sub folder with a name of your choosing). You can see what the DLL is called by running dotnet build then listing the DLLs in the bin folder, e.g.
Mac/Linux:
ls bin/Debug/netcoreapp2.1/*.dll
Windows:
dir bin\Debug\netcoreapp2.1\*.dll
In my case it's called hello-docker.dll because I created the project with the command: dotnet new console -o hello-docker, then ran cd hello-docker and dotnet build.
So for my case I would use ENTRYPOINT ["dotnet", "out/hello-docker.dll"] in myDockerfile`.
@clarenceb Thanks. It'd be awesome if they could update the doc to show that the name of the folder the user creates is important. I hit the same issue on OS X Mojave. Cheers.
I updated this article and it should make sense now. This should be published today.
Thanks @Thraka !